xml文件定义的元素的某个属性值含有&字符导致解析出错

xiaoxiao2021-03-01  23

页面要解析一个程序输出的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中含有字符& 就解析出错呢? 我了解一些解析器在处理& ,<,>这样的 字符时要特殊处理, 但是我把&写成&也还是不行啊,请高手帮分析分析.
转载请注明原文地址: https://www.6miu.com/read-4550243.html

最新回复(0)