An invalid or illegal XML character is specified.

ZHANGJNWEI 2013-05-24 04:15:55

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. 求问原因?
...全文
375 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

5,655

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧