<?xml version="1.0" encoding="gb2312"?>
<threads>
<thread>
<title>我是</title>
<author>大大</author>
<content>飞交换机</content>
</thread>
<thread><title>1111</title><author>111111</author><content>111111111</content></thread>
<thread><title>11111111111111111111</title><author>1111111111</author><content>11111111111111111111</content></thread>
<thread><title>11111</title><author>111111</author><content>111</content></thread>
</threads>
这是我用PHP动态修改后的XML文件,排版格式比较乱,有什么办法能把XML文件格式排版整理好?
也可以自动识别和整理代码,而且栅格显示很方便修改eclipse整理后如下:<?xml version="1.0" encoding="gb2312"?>
<threads>
<thread>
<title>我是</title>
<author>大大</author>
<content>飞交换机</content>
</thread>
<thread>
<title>1111</title>
<author>111111</author>
<content>111111111</content>
</thread>
<thread>
<title>11111111111111111111</title>
<author>1111111111</author>
<content>11111111111111111111</content>
</thread>
<thread>
<title>11111</title>
<author>111111</author>
<content>111</content>
</thread>
</threads>