Skip to Main Content

SQL & PL/SQL

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!

Junk characters in XML files

Oracle ManiacNov 13 2017 — edited Nov 17 2017

Hi Team

I am using powershell script to trim first two lines of an XML file and then load it into Oracle DB using SQLLDR.

Not sure, why most if the files error out with this error.

Apparently junk characters. Any way to deal with this so that this is taken care of?

Control file for loading data

LOAD DATA

INFILE 'filelist.dat'

APPEND INTO TABLE table_xml

(

   filename CHAR(1000),

   xmldata  LOBFILE(filename) TERMINATED BY EOF,

   sno      CHAR(10) "TABLE_XML_SEQ.NEXTVAL",

   loaddate SYSDATE

)

Error received in sqlldr logs:

Record 4: Rejected - Error on table TABLE_XML, column XMLDATA.

ORA-31011: XML parsing failed

ORA-19202: Error occurred in XML processing

LPX-00210: expected '<' instead of '¿'

Error at line 1

ORA-06512: at "SYS.XMLTYPE", l

Thanks

This post has been answered by Billy Verreynne on Nov 14 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 15 2017
Added on Nov 13 2017
41 comments
4,717 views