[英]org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup
[英]org.xmlGetting exception while parsing XML.sax.SAXParseException: The content of elements must consist of well-formed character data or markup
我在由 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 將持續到表的一列中
您的 XML無效
row-->Parent-->Child-->Child 1
XML 元素名稱中不能有空格。 您的 xml 元素名稱Child 1有一個空格。
XML 元素名稱必須遵循這些命名規則......
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.