ge0rge
06-21-2007, 04:39 PM
Hello.
I'm using the Bulkload 4.0 to import data elements from an XML file into a SQL server (2003) database.
The Bulkload process works fine until it's get to a certain section of the XML file that has multiple child elements all with the same name as shown below:
<ICD9S>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
</ICD9S>
My associated XSD Schema for this section looks like this:
<xsd:element name="ICD9S" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ICD9LINE" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ICD9" sql:field="" type="xsd:string" />
<xsd:element name="ICD9DESC" sql:field="" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
**NOTE: There should be a total of 5 ICD9LINE sections in the above schema but I left them out.
Whenever I run the little bulkload script I get an error saying that the ICD9LINE is unexpected according to the parent model of ICD9S.
Any help would be greatly appreciated.
I'm using the Bulkload 4.0 to import data elements from an XML file into a SQL server (2003) database.
The Bulkload process works fine until it's get to a certain section of the XML file that has multiple child elements all with the same name as shown below:
<ICD9S>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
<ICD9LINE>
<ICD9 />
<ICD9DESC />
</ICD9LINE>
</ICD9S>
My associated XSD Schema for this section looks like this:
<xsd:element name="ICD9S" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ICD9LINE" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ICD9" sql:field="" type="xsd:string" />
<xsd:element name="ICD9DESC" sql:field="" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
**NOTE: There should be a total of 5 ICD9LINE sections in the above schema but I left them out.
Whenever I run the little bulkload script I get an error saying that the ICD9LINE is unexpected according to the parent model of ICD9S.
Any help would be greatly appreciated.