XML Parsing FailedSee original GitHub issue
I 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.
- Created 5 years ago
- Comments:5 (3 by maintainers)
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 :
`SELECT items.name AS FC_Name FROM gdb_items_vw items INNER JOIN gdb_itemtypes itemtypes ON items.Type = itemtypes.UUID WHERE ITEMTYPES.NAME IN ('Feature Class', 'Table') AND ITEMS.DEFINITION LIKE '%Versioned>true%' `
@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%';