Home » Developer & Programmer » JDeveloper, Java & XML » XML to RDBMS (Oracle 1g)
XML to RDBMS [message #404508] Fri, 22 May 2009 00:59 Go to next message
deepshikhahcl
Messages: 14
Registered: October 2008
Junior Member
Hi,

I have an XML. my requirment is that i have to use the xmldb so that the data that is there in the XML can be imported into the database and relations are created among them.
I have inserted the xdb tags but somehow tables are not created.
below is the xsd that i am using.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="tr
ue">
<xs:element name="UserDB" xdb:defaultTable="USERDB">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="User" xdb:SQLName="User">
<xs:complexType>
<xs:sequence>
<xs:element name="Roles" xdb:SQLName="Roles">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="Role" xdb:SQLName="Role" >
<xs:complexType>
<xs:attribute name="Name" xdb:SQLName="NAME" xdb:SQLType="VARCHAR2"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NodeAccess" xdb:SQLName="NodeAccess">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="Node" minOccurs="0" xdb:SQLName="Node">
<xs:complexType>
<xs:attribute name="name" xdb:SQLName="NAME" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="nodeId" xdb:SQLName="NODEID" xdb:SQLType="NUMBER"/>
<xs:attribute name="nodeName" xdb:SQLName="NODENAME" xdb:SQLType="VARCHAR2"/>
</xs:complexType>
</xs:element>
<xs:element name="Level" minOccurs="0" xdb:SQLName="Level">
<xs:complexType>
<xs:attribute name="name" xdb:SQLName="NAME" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="levelId" xdb:SQLName="LEVELID" xdb:SQLType="VARCHAR2"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="eid" xdb:SQLName="EID" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="description" txdb:SQLName="DESCRIPTION" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="firstName" xdb:SQLName="FNAME" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="lastName" xdb:SQLName="LNAME" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="email" xdb:SQLName="EMAIL" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="phoneNumber" xdb:SQLName="PHONE" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="faxNumber" xdb:SQLName="FAX" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="country" xdb:SQLName="COUNTRY" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="status" xdb:SQLName="STATUS" xdb:SQLType="VARCHAR2"/>
<xs:attribute name="userAccessLevel" xdb:SQLName="USERACCESSLEVEL" xdb:SQLType="VARCHAR2">
<xs:annotation>
<xs:documentation>"Global" for Global access, "Market" for Market Access and "$Level Name$" for Market specific Level Access</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="UserDBDate" xdb:SQLName="USERBDATE" xdb:SQLType="DATE"/>
<xs:attribute name="UserDBTime" xdb:SQLName="USERBTIME" xdb:SQLType="DATE"/>
</xs:complexType>
</xs:element>
</xs:schema>
Re: XML to RDBMS [message #404530 is a reply to message #404508] Fri, 22 May 2009 02:23 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
deepshikhahcl wrote on Fri, 22 May 2009 07:59
I have inserted the xdb tags but somehow tables are not created.


Care to elaborate on that?
What exactly did you do with this xsd?
Show us the steps that you took & the response Oracle gave you. Preferrably by copy-paste of your sqlplus session.
Previous Topic: Export to excel (merged)
Next Topic: how to call java class in plsql or how to use plsql to invoke shell (2 threads merged by bb)
Goto Forum:
  


Current Time: Fri Dec 02 20:47:46 CST 2016

Total time taken to generate the page: 0.08113 seconds