An invalid or illegal XML character is specified.
FileReader file = new FileReader(m_dataFileName);
// Call the org.apache.xml.soap.XMLParseUtils class's
// getXMLDocBullder results DocumentBilder object
DocumentBuilder xdb = new XMLParserUtils().getXMLDocBuilder();
// Through the parsrMachine reap the Document object
Document doc = xdb.parse(new InputSource(file));
源代码中解析文件的代码;
GenericHTTPSoapClient trans = new GenericHTTPSoapClient("http://localhost:8070/com", DEFAULT_DATA_FILENAME )
main 函数中文件: URL 地址影响文件解析吗?
<?xml version="1.0" encoding="UTF-8"?>
<PurchaseOrder xmlns="urn:oreilly-jaws-samples">
<shipTo country="US">
<name>Joe Smith</name>
<street>14 Oak Park</street>
<city>Bedford</city>
<state>MA</state>
<zip>01730</zip>
</shipTo>
<items>
<item partNum="872-AA">
<productName>Candy Canes</productName>
<quantity>444</quantity>
<price>1.68</price>
<comment>I want candy!</comment>
</item>
</items>
这是要解析的xml文件
出现INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. 求问原因?