Avoid XML Schema Validation

From: webtourist <webtourist_at_gmail.com>
Date: Thu, 27 Mar 2008 10:19:26 -0700 (PDT)
Message-ID: <9499e4dd-f4f0-4911-ace5-4b78adcc61d6@s8g2000prg.googlegroups.com>

10gR2

Schema is NOT registered with XDB.

I have simple queries like this to extract value from SMALL XML doc passed in as CLOB:

 SELECT extractvalue(VALUE(rt), '/somexpath/Emp_Id', c_schema_namespace) INTO l_test

   FROM TABLE(xmlsequence(extract(sys.xmltype(some_xml_clob), '/ somexpath', c_schema_namespace))) rt;

  • Now I have a temporary need - WITHOUT modifying schema - to change reference from <Emp_Id> to <Emp_SSI>:

 SELECT extractvalue(VALUE(rt), '/somexpath/Emp_SSI', c_schema_namespace) INTO l_test

   FROM TABLE(xmlsequence(extract(sys.xmltype(some_xml_clob), '/ somexpath', c_schema_namespace))) rt;

So I get the error:
ORA-30937: No schema definition for 'string' (namespace 'string ...

And if I remove " c_schema_namespace", I get ORA-31011: XML parsing failed.

Is there a way to disable or get around this (validation) ?

thanks Received on Thu Mar 27 2008 - 12:19:26 CDT

Original text of this message