[HELP] Error while validating XML against XSD using PL SQL

raksrules

Elite
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

Code:
    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

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

DB Version is 9i
 
Back
Top