Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

create a structured table with xsd files

francy77Apr 19 2011 — edited Apr 21 2011
Hi all, i need a way to create a table having an xsd schema that is not of the type like this one:
CREATE TABLE "Employees520_TAB" OF SYS.XMLTYPE 
  XMLSCHEMA "/public/impiegato5"
  ELEMENT "Employees"
in other words i have the following csd file:
<xsd:schema 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">
    <xsd:element name="Employees">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="SSN" type="xsd:string"/>
                <xsd:element name="Name" type="xsd:string"/>
                <xsd:element name="DateOfBirth" type="xsd:date"/>
                <xsd:element name="EmployeeType" type="xsd:string"/>
                <xsd:element name="Salary" type="xsd:long"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>
what i want to get is a "traditional" table of this form:
create table employee (SSN varchar2(100), name varchar2(100), DateOfBirth varchar2(100), EmployeeType varchar2(100), Salary number)
in wich the xml is splited across a usual table, is there a way i can accomplish this??
and after that inserting the xml in the table employee.
thanks
Francesco

Edited by: francy77 on Apr 19, 2011 9:22 AM

Edited by: francy77 on Apr 19, 2011 9:23 AM
This post has been answered by Marco Gralike on Apr 20 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 19 2011
Added on Apr 19 2011
5 comments
368 views