I ve got html datas that i m converting into a Dom4J document.
我发现了一个错误:
org.dom4j.DocumentException: Error on line 1 of document : Reference is not allowed in prolog. Nested exception: Reference is not allowed in prolog.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.DocumentHelper.parseText(DocumentHelper.java:278)
at MonTest.main(MonTest.java:21)
Nested exception:
org.xml.sax.SAXParseException: Reference is not allowed in prolog.
它是“和;”的特性,即为了建立该文件,需要逃入和安放。
在XML中,我们似乎需要逃脱5个特征:(大体、带、引、安插、apos)
然而,在不将其纳入“目标”要素的情况下,如何逃脱:
<div id="test" class= toto >A&A<A"A</div>
应当:
<div id="test" class= toto >A&A<A"A</div>
而不是
<div id="test" class='toto'>A&A<A"A</div>
Thank you,