Home » Developer & Programmer » JDeveloper, Java & XML » [HELP] Error while validating XML against XSD using PL SQL
[HELP] Error while validating XML against XSD using PL SQL [message #389630] Mon, 02 March 2009 23:50 Go to next message
rak007
Messages: 107
Registered: October 2006
Location: Mumbai / Pune, India
Senior Member
Hi, i am encountering the following error while trying to validate the XML file against XSD schema using PL SQL.
The XML File and XSD files are stored in two different tables in CLOB type variables.

This is how i am using


    l_xml_type_0            XMLTYPE;
    l_xml_type              XMLTYPE;
 ...................
....................

    l_xml_type_0  := XMLTYPE.createxml(l_xml_data);
    l_xml_type    :=   l_xml_type_0.createschemabasedxml(l_xml_schema_name);
    l_xml_type.setschemavalidated(1);
    xmltype.schemavalidate(l_xml_type);


In the above code unit l_xml_data is a CLOB type variable holding the entire XML file

l_xml_schema_name is the XSD name against which validation is the happen. This schema is registered in the database and can be found in ALL_XML_SCHEMAS

The error message i am getting is

ORA-19030 Method invalid for non-schema based XML Documents


DB Version is 9i

[Updated on: Tue, 03 March 2009 00:02]

Report message to a moderator

Re: [HELP] Error while validating XML against XSD using PL SQL [message #389650 is a reply to message #389630] Tue, 03 March 2009 00:43 Go to previous messageGo to next message
Frank
Messages: 7877
Registered: March 2000
Senior Member
Googling for your error-code (ORA-19030) reveals some possible causes
Re: [HELP] Error while validating XML against XSD using PL SQL [message #389727 is a reply to message #389650] Tue, 03 March 2009 07:06 Go to previous message
rak007
Messages: 107
Registered: October 2006
Location: Mumbai / Pune, India
Senior Member
The above issue has been solved by a workaround. But now we have another issue. There is an error message saying

ORA-01830: date format picture ends before converting entire input string
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 43



The offending line in the XML file is

create_time="13:20:00-05:00"


and the error message is

ORA-01830: date format picture ends before converting entire input string ORA-06512: at "SYS.XMLTYPE", line 0


If i edit the XML file and change the above line to
create_time="13:20:00"


it works fine
Previous Topic: Java, PL/SQL Proc
Next Topic: Got minus one from a read call
Goto Forum:
  


Current Time: Thu Jul 24 08:31:11 CDT 2014

Total time taken to generate the page: 0.11893 seconds