On Oracle 11gr2, I import an xml file in a table:
INSERT INTO MS386_XML_TEMPLATE
VALUES (SYSDATE, pvNomeFile,
xmltype(bfilename(myDirectory, pvNomeFile), nls_charset_id('UTF8')));
When I select on this table, I have the following error:
SELECT TBELENCOPOD.POD
FROM
(SELECT XMLCast(TBPOD.COLUMN_VALUE AS VARCHAR2(20)) AS POD
FROM TABLE( XMLSequence( XMLTYPE(CURSOR
(SELECT * FROM MS386_XML_TEMPLATE
)).extract('/ROWSET/ROW/XML_FILE/edi_l/trader/idrif idrich/hdr/pod') ) ) TBPOD
) TBELENCOPOD
LEFT JOIN MS038_METERS TBPOD
ON TBELENCOPOD.POD=TBPOD.POD
WHERE TBPOD.POD IS NULL
GROUP BY TBELENCOPOD.POD;
ORA-31011: ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00204: syntax error
Error at line 7
ORA-06512: a "SYS.XMLTYPE", line 343
ORA-06512: a 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.
The xml is valid, I had checked it with a validator. Thank you very much,
Igor