XML Parsing Failed
See original GitHub issueI am not sure if I am posting the issue in the right place.
I am trying to run this SQL - https://github.com/Esri/developer-support/blob/master/arcsde-sql/oracle/multi-user-management/delta-table-record-count.sql.
The following code is fails parse the XML.
SELECT items.name AS FC_Name,
XMLCast(XMLQuery('*/Versioned' PASSING xmltype(items.definition) RETURNING CONTENT) AS VARCHAR(100)) AS Versioned
FROM gdb_items_vw items
It is throwing following error message:
ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00245: extra data after end of document Error at line 1 ORA-06512: at “SYS.XMLTYPE”, line 272 ORA-06512: at line 1 31011. 00000 - “XML parsing failed” *Cause: XML parser returned an error while trying to parse the document. *Action: Check if the document to be parsed is valid.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
ORA-31011: XML parsing failed issue - Ask TOM
While extracting data from xml parsing issue is coming. Issue is coming while extracting data for field_name 401K_LOAN_1 and 401K_LOAN_2. Please advise.
Read more >ORA-31011: XML parsing failed - invalid characters (oracle ...
I'm producing an XML document using SQL on Oracle 11g database. But I'm having a problem with a database field, because the title...
Read more >XML Parsing error: syntax error
The most common cause is encoding errors. There are several basic approaches to solving this: escaping problematic characters ( < becomes < ,...
Read more >XML Parser Error Codes
If the XML parser detects an error in the XML document during parsing, message RNX0351 will be issued. From the message, you can...
Read more >ORA-31011 XML parsing failed
This article explains what to do when attempting to XML parsing , the following error occurs: ORA-31011.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@natas333x2 Thank you for your feedback. I ran the entire function first but it failed with the exact same error. We have ArcGIS 10.4.1 and 10.4.1 Oracle geodatabase. Just because the entire function failed to execute, I broke down the code to pieces to see where exactly the it was failing. Then, I realized the query mentioned below was failing to execute:
SELECT items.name AS FC_Name, EXTRACTVALUE(xmltype(items.definition), '*/DEFeatureClassInfo') "Versioned" FROM gdb_items_vw items. INNER JOIN gdb_itemtypes itemtypes ON items.Type = itemtypes.UUID WHERE ITEMTYPES.NAME IN ('Feature Class', 'Table')
Eventually, I managed to run the the entire function by replacing the above part with the code shown below after discovering this example on Esri’s help documentation - http://desktop.arcgis.com/en/arcmap/10.3/manage-data/using-sql-with-gdbs/determining-which-data-is-versioned.htm :
@RajChavada Your modified script works for me too. I took out the “>true” part of the AND clause and it still worked. Let me know if it works for you too. It might just be an aesthetic thing for me but I think
items.definition LIKE '%Versioned%';
provides more clarity than
items.definition LIKE '%Versioned>true%';