Forum Stats

  • 3,759,024 Users
  • 2,251,493 Discussions
  • 7,870,471 Comments

Discussions

Registering XML Schema with CLOB element

Dear All,
I am trying to register an XML-Schema with an element of type CLOB.
Previously it was STRING and it was not a problem.
But the data for this element has drastically increased and so I am now trying to register the schema with a CLOB column.

The below is the schema.

begin dbms_xmlschema.registerSchema(
'test.xsd',
XMLType('<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.DMexample.com/ldb2xmlfile.xsd"
xmlns:xdb="http://xmlns.oracle.com/xdb"
targetNamespace="http://www.DMexample.com/ldb2xmlfile.xsd" version="1.0"
elementFormDefault="qualified">
<xs:element name="XMLDATA" type="LDB2XMLFILE"/>
<xs:complexType name="LDB2XMLFILE">
<xs:sequence>
<xs:element name="XMLSSDDATA">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="SSDDATA">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">

<xs:element name="ADV-FORMULA" xdb:SQLType="CLOB"/>


</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>'), TRUE, TRUE, FALSE, FALSE);
end;

But I am getting an error (ORA-31094 Incompatible sql type "CLOB" for attribute or element "ADV-FORMULA")
Can anyone help me out in registering this schema.

Appreciate any help.

Thanks & Regards
Madhu K
Tagged:
This discussion has been closed.