Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle xml error on a file

Yellow75Aug 25 2015 — edited Aug 26 2015

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

This post has been answered by Marco Gralike on Aug 25 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 23 2015
Added on Aug 25 2015
10 comments
3,004 views