Home > Archive > MS SQL XML > September 2005 > Need help on BulkLoad!!!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Need help on BulkLoad!!!
Helen

2005-09-14, 8:24 pm

I have an XML file, and want to bulkload to database. If I delete the
"xmlns="http://www.theIMO.com/schema" " namespace in the XML file, then it
works. But with the xmlns in XML file, I just got empty table. I do not want
to change the XML file. How can I modify the schema .xsd file to make the
BulkLoad work? Many thanks!!!

The XML file has the format of
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl"
href="http://www.theIMO.com/docrefs/stylesheet/ DispUnconsHOEP_HTML_
t1-1.xsl"
?>
<IMODocument
docID="DispUnconsHOEP"
xmlns="http://www.theIMO.com/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.theIMO.com/schema
http://www.theIMO.com/docrefs/schem...consHOEP_r1.xsd">

<IMODocHeader>
<DocTitle>Hourly Ontario Energy Price (HOEP) Report</DocTitle>
<DocRevision>1</DocRevision>
<DocConfidentiality>
<DocConfClass>PUB</DocConfClass>
</DocConfidentiality>
<CreatedAt>2005-06-27T09:03:36</CreatedAt>
</IMODocHeader>
<IMODocBody>
<HOEPs>
<HOEP>
<Hour>1</Hour>
<Price>47.38</Price>
<DataSource>DSO_RD</DataSource>
</HOEP>
<HOEP>
<Hour>2</Hour>
<Price>49.75</Price>
<DataSource>DSO_RD</DataSource>
</HOEP>
</HOEPs>
</IMODocBody>
</IMODocument>

and the xsd file is
?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="HOEPs" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="HOEP" sql:relation ="tmp_IESO_HOEP2">
<xsd:complexType> <xsd:sequence>
<xsd:element name="Hour" type="xsd:string" sql:field="HOEP_Hour" />
<xsd:element name="Price" type="xsd:string" sql:field="HOEP_Price" />
<xsd:element name="DataSource" type="xsd:string"
sql:field="HOEP_DataSource" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com