dom4j 解析xml错误
<?xml version="1.0" encoding="UTF-8"?>
<root>
<type caption="经费支出明细表" title="经费支出">
<list title="经常性支出">
<field>5010101</field>
<field>5010201</field>
</list>
<list title="项目支出">
<field>5020101</field>
<field>5020201</field>
</list>
</type>
</root>
字符串非常简单,如果编码GB2312可以用ie解析,但是用org.dom4j.DocumentHelper的parseText(xml)却抱解析错误,不知道什么原因。
说最后以行有无效字符:
org.dom4j.DocumentException: Error on line 14 of document : An invalid XML character (Unicode: 0x0) was found in markup after the end of the element content. Nested exception: An invalid XML character (Unicode: 0x0) was found in markup after the end of the element content.