页面要解析一个程序输出的XML文件,
文件如下:
<tree>
<tree id="12" action="user.do?method=delete&branchno=12"/>
<tree id="13" action="user.do?method=delete&branchno=13"/>
<tree id="14" action="user.do?method=delete&branchno=14"/>
<tree id="15" action="user.do?method=delete&branchno=15"/>
</tree>
为什么action中含有字符& 就解析出错呢?
我了解一些解析器在处理& ,<,>这样的 字符时要特殊处理,
但是我把&写成&也还是不行啊,请高手帮分析分析.
文件如下:
<tree>
<tree id="12" action="user.do?method=delete&branchno=12"/>
<tree id="13" action="user.do?method=delete&branchno=13"/>
<tree id="14" action="user.do?method=delete&branchno=14"/>
<tree id="15" action="user.do?method=delete&branchno=15"/>
</tree>
为什么action中含有字符& 就解析出错呢?
我了解一些解析器在处理& ,<,>这样的 字符时要特殊处理,
但是我把&写成&也还是不行啊,请高手帮分析分析.
本文探讨了一个关于XML文件解析的问题,具体来说是当XML文件中的属性值包含特殊字符&时出现的错误。文章分析了XML解析器对于特殊字符的处理方式,并尝试解决这一问题。
2249

被折叠的 条评论
为什么被折叠?



