我将在WSDL文件形成的处理程序中发送一个查询,如果我们没有访问数据库的权限,就只能执行查询。处理程序只有一个xml标记,我们必须在其中写入要执行的查询,然后它将查询数据库并以xml格式返回响应。我正在执行一个简单的选择查询,以获取一行的详细信息。但是在响应中我得到了下面的异常
org.xml.sax.SAXParseException:The content of elements must consist of well-formed character data or markup.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
proper return response XML should be
<row>
<Vendor>
<Number>
<CountryCode>1</CountryCode>
<AreaCode>23</AreaCode>
<SubNumber>456</SubNumber>
</Number>
</Vendor>
</row>
in this <SubNumber> tag is giving error,
i am not aware of value inside this tag in database.
i followed the stack trace and piece of code which is throwing the exception is:
DOMParser parser = new DOMParser();
有没有人可以帮助我解决这个异常?在哪里查找?需要进行任何修改?我需要检查返回数据中的标记吗?这些标记基本上有效吗?Child1标记的设计方式是,它在内部保存一个XML,该XML将进入并持久保存到表的一列中
1条答案
按热度按时间jljoyd4f1#
您的XML无效
XML元素名称中不能有空格。您的XML元素名称Child 1中有空格。
XML元素名称必须跟在这些naming rules.....后面