我在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将持续存在于表的一列中
答案 0 :(得分:0)
您的XML 无效
row-->Parent-->Child-->Child 1
您不能在XML元素名称中包含空格。您的xml元素名称子级1 有空格。
XML元素名称必须遵循这些naming rules.....