Jump to content
Davenne Marc

Oracle 12 : xml file with several declarations

Recommended Posts

Hi,

I have a program working with xml files that is not performing anymore since we installed Oracle 12 databases.

The error we suddenly have is this one :

ORA-31011: XML parsing failed 
ORA-06512: at "MYUSER.MYPACKAGE", line 1663 
ORA-19213: error occurred in XML processing at lines 2 
LPX-00209: PI names starting with XML are reserved 
ORA-06512: at "SYS.XMLTYPE", line 272 
ORA-06512: at "MYUSER.MYPACKAGE", line 1162 
ORA-06512: at line 1 

It seems there is a problem on line 2 of the xml. Indeed this file is particular. There is an xml declaration on each line and lines are pretty long, defining several xml blocks :

<?xml version="1.0" encoding="utf-8"?><Flag:......

<?xml version="1.0" encoding="utf-8"?><Message:......

<?xml version="1.0" encoding="utf-8"?><Message:......

.....

<?xml version="1.0" encoding="utf-8"?><Message:......

<?xml version="1.0" encoding="utf-8"?><EndFile:......

In the program the first thing done is to create a blob file from this xml file (this is a function called at the beginning :  FUNCTION TransformToCLOB(filename varchar2) RETURN CLOB)

src_clob:=BFILENAME('MY_REPERTOIRE', filename);
dbms_lob.createtemporary(dest_clob, cache=>TRUE);
DBMS_LOB.FILEOPEN(src_clob);

DBMS_LOB.LoadFromFile(
dest_clob
, src_clob
,DBMS_LOB.GETLENGTH(src_clob)
);

dbms_lob.close(src_clob);

RETURN dest_clob;

after that, there is this instruction  (ligne 1162 where the error occurs):

v_xml:=XMLTYPE(dest_clob); 

What has changed in Oracle 12 that causes the problem?

 I have the feeling that several declarations in one file are not welcome anymore.

Share this post


Link to post
Share on other sites

Hi burleson.

I found this page already but it does not say anything about it. If you can open the request,  it would be quite appreciated.

Thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×