XML file with multiple repetitive columns
Posted: Wed Dec 06, 2006 6:37 am
Hi
I am trying to populate an XML file with two columns with repitive values to a table in Oracle database.The XML file structure goes like this -
<xs:schema id="UserPrivilegesDelta" targetNamespace="urn:mci.urm.pmi:export:UserPrivilegesDelta:v1" xmlns:mstns="urn:mci.urm.pmi:export:UserPrivilegesDelta:v1" xmlns="urn:mci.urm.pmi:export:UserPrivilegesDelta:v1" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="Privileges">
<xs:complexType>
<xs:sequence>
<xs:element name="UserChanges" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="UserChange" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="OldValue" form="unqualified" type="xs:string"/>
<xs:attribute name="NewValue" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:choice maxOccurs="3">
<xs:element name="Change">
<xs:complexType>
<xs:sequence>
<xs:element name="Privilege" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="User" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:attribute name="Value" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="ActionList" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Action" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="Value" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Agency" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Product" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="Value" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Value" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Type" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
In this,the columns Action and Product can have multiple values.We have designed a job with two XML Input stages to split these two columns.The data from these two XML stages would be populated to two different tables in Oracle.Is there a way to populate this XML file into a single table through a single XML stage?
I am trying to populate an XML file with two columns with repitive values to a table in Oracle database.The XML file structure goes like this -
<xs:schema id="UserPrivilegesDelta" targetNamespace="urn:mci.urm.pmi:export:UserPrivilegesDelta:v1" xmlns:mstns="urn:mci.urm.pmi:export:UserPrivilegesDelta:v1" xmlns="urn:mci.urm.pmi:export:UserPrivilegesDelta:v1" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="Privileges">
<xs:complexType>
<xs:sequence>
<xs:element name="UserChanges" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="UserChange" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="OldValue" form="unqualified" type="xs:string"/>
<xs:attribute name="NewValue" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:choice maxOccurs="3">
<xs:element name="Change">
<xs:complexType>
<xs:sequence>
<xs:element name="Privilege" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="User" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:attribute name="Value" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="ActionList" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Action" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="Value" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Agency" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Product" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="Value" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Value" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Type" form="unqualified" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
In this,the columns Action and Product can have multiple values.We have designed a job with two XML Input stages to split these two columns.The data from these two XML stages would be populated to two different tables in Oracle.Is there a way to populate this XML file into a single table through a single XML stage?