XML

  • Can someone tell me how to load this into sql server?

    <?xml version="1.0" ?>

    <!--

     Generated by using BizTalk Editor on Fri, Jun 27 2003 02:48:31 PM 

      --><script>f(clean);</script>

    <!--

     Copyright (c) Microsoft Corporation. All rights reserved. 

      --><script>f(clean);</script>

    - <Schema name="ProductAlertResponse" b:BizTalkServerEditorTool_Version="1.5" b:root_reference="ProductAlertResponse" b:version="1.0" b:standard="XML" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:b="urn:schemas-microsoft-com:BizTalkServer" xmlns:d="urn:schemas-microsoft-com:datatypes">

      <b:SelectionFields />

    - <ElementType name="Version" content="textOnly" model="closed">

      <b:RecordInfo />

      </ElementType>

    - <ElementType name="TransactionID" content="textOnly" model="closed" d:maxLength="18" d:type="string">

      <b:FieldInfo />

      </ElementType>

    - <ElementType name="TransactionHeader" content="eltOnly" model="closed">

      <b:RecordInfo />

      <element type="SenderID" maxOccurs="1" minOccurs="1" />

      <element type="ReceiverID" maxOccurs="1" minOccurs="1" />

      <element type="ErrorStatus" maxOccurs="1" minOccurs="0" />

      <element type="DocumentID" maxOccurs="1" minOccurs="1" />

      <element type="TransactionID" maxOccurs="1" minOccurs="0" />

      <element type="TimeStamp" maxOccurs="1" minOccurs="1" />

      </ElementType>

    - <ElementType name="TimeStamp" content="textOnly" model="closed" d:type="dateTime">

      <b:FieldInfo />

      </ElementType>

    - <ElementType name="SenderID" content="textOnly" model="closed" d:maxLength="18" d:minLength="1" d:type="string">

      <b:FieldInfo />

      </ElementType>

    - <ElementType name="ReceiverID" content="textOnly" model="closed" d:maxLength="18" d:minLength="1" d:type="string">

      <b:FieldInfo />

      </ElementType>

    - <ElementType name="ProductAlertResponse" content="eltOnly" model="closed">

      <b:RecordInfo />

      <element type="Version" maxOccurs="1" minOccurs="1" />

      <element type="TransactionHeader" maxOccurs="1" minOccurs="1" />

      </ElementType>

    - <ElementType name="ErrorStatus" content="textOnly" model="closed">

      <b:RecordInfo />

    - <AttributeType name="ErrorNumber" d:type="string">

      <b:FieldInfo />

      </AttributeType>

      <attribute type="ErrorNumber" required="no" />

      </ElementType>

    - <ElementType name="DocumentID" content="textOnly" model="closed" d:maxLength="40" d:type="string">

      <b:FieldInfo />

      </ElementType>

      </Schema>

  • How to import XML into SQL Server with the XML Bulk Load component

    http://support.microsoft.com/kb/316005

     

    MohammedU
    Microsoft SQL Server MVP

  • Are you saying that I can't use that xml data to create the schema? That file should be used to create the table itself. And I tried the example that you showed me and it says there is an error in the data. I can't figure out what it is.

  • Ok. I changed the name of the file to file.xdr. I opened it in Visual Studio. I used the XML file command to change it to xml. Copied and saved it as an xml file in notepad. I tested it in MS Access and it created all the tables no problem. Now how in the hell do I do that in Sql Server 2005??? It can't be this hard. It should be as easy as it was for Access.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply