468,458 Members | 1,850 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,458 developers. It's quick & easy.

Error 0RA-30937: Error is Comming While Inserting into an XML Type Table

Dear Forum Members,
I have generated an XML Schema and a Table of XMLType referencing the XML Schema.
Now When I am Inserting the Data into the Table.
I am getting the Error 0RA-30937: Error is Comming.

I am pasting the Code which I have written.
Appreciate any Help...

[HTML]begin dbms_xmlschema.registerSchema(
'http://www.robertboschindia.com/example.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/example.xsd"
targetNamespace="http://www.DMexample.com/example.xsd" version="1.0"
elementFormDefault="qualified">

<xs:complexType name="LDB2XMLFILE">
<xs:sequence>
<xs:element name="XMLSSDDATA">
<xs:complexType>
<xs:sequence>
<xs:element name="LabelList">
<xs:complexType>
<xs:sequence>
<xs:element name="SSDDATA">
<xs:complexType>
<xs:sequence>

<xs:element name="Labelname" type="xs:string"/>
<xs:element name="KEY" type="xs:integer"/>
<xs:element name="FINISHED" type="xs:string"/>
<xs:element name="CONTACTNUMBER" type="xs:string"/>
<xs:element name="DEFAULT" type="xs:string"/>
<xs:element name="MIN" type="xs:integer"/>
<xs:element name="MAX" type="xs:integer"/>
<xs:element name="UNIT" type="xs:string"/>
<xs:element name="FORMULA" type="xs:string"/>

</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

</xs:sequence>
</xs:complexType>

<xs:element name="XMLDATA" type="LDB2XMLFILE"/>

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


[/HTML]
-- Creating the Table
CREATE TABLE LDB2_XMLFILE OF XMLType
XMLSCHEMA "http://www.robertboschindia.com/example.xsd"
ELEMENT "XMLDATA";


--Inserting into Table
[HTML]
insert into LDB2_XMLFILE
values(XMLType('<?xml version="1.0" encoding="ISO-8859-1"?>
<XMLDATA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.DMexample.com/example.xsd"
xsi:schemaLocation="http://www.DMexample.com/example.xsd http://www.boschindia.com/example.xsd">
<XMLSSDDATA>
<LabelList>
<SSDDATA>
<Labelname>This is Lable</Labelname>
<KEY>123</KEY>
<FINISHED>This is Finished data</FINISHED>
<CONTACTNUMBER>This is Contact Number </CONTACTNUMBER>
<DEFAULT>This is default </DEFAULT>
<MIN>1</MIN>
<MAX>3</MAX>
<UNIT>This is Unit </UNIT>
<FORMULA>tHIS IS FORMULA</FORMULA>
</SSDDATA>
</LabelList>
</XMLSSDDATA>
</XMLDATA>')
);
[/HTML]
-- Getting Error
ORA-30937: No schema definition for 'XMLSSDDATA' (namespace 'http://www.DMexample.com/example.xsd') in parent '/XMLDATA'


Regards
Madhu K
Jul 6 '07 #1
1 2389
Dököll
2,364 Expert 2GB
Have to admit, I have not yet seen this error. Please give link a go, see what you can pull up. Just in case this is related to your previous post: http://www.w3schools.com/schema/schema_howto.asp
Jul 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.