XML
<?xml version="1.0" encoding="UTF-8"?>
<root>
<system value="s1">
<title>a&b&c</title>
</system>
<system value="s2">
<title>test</title>
</system>
</root>
使用sax解析以上xml的时候,由于xml中包含有特殊字符&
,所以第二个system标签没法解析到。
求解决办法
天蓬老师2017-04-17 13:31:08
This is illegal XML, and normal parsing should not be able to do anything with it.
If you are sure that no XML entity can appear in this XML document, you can replace the &
characters with &
before parsing.