Oracle xml parsing gives invalid character error

I am using the Oracle 11G sql export utility to convert tabular data to XML. For this, I used utf-8 encoding. The special characters (0x13) that I see in the DB as square squares entered the xml as it is. To get rid of this special character, do I need to select a different encoding in Sql Developer?

The problem I encountered is that the "xml parsing failed" failed while I try to insert the xml file created above into another Oracle table (using the xmltable function). I get the following error.

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00216: invalid character 0 (0x13)
Error at line 10682
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
ORA-06512: at line 9

If I remove the special characters from the xml file manually, it starts working fine. But I would like this work to not be deleted.

+3
2

REPLACE - CHR (13) :

REPLACE(arg1, CHR(13), '');
+1

spl, Oracle dbms_xmlgen.convert(...)

dbms_xmlgen.convert(arg1)
+1

Source: https://habr.com/ru/post/1715651/


All Articles