How to import the following XML using Integration Services? -
09-19-2005
, 05:25 AM
Hi,
I use the SQL Server 2005 June CTP and I need to import the following XML
into a database table. I tried to generate a XSD out of it, but SQL Server
got confused about the repeating <value> tags I'm afraid. The resulting XSD
could not be used in integration services. I'm a newbie to the XML stuff, so
any help is really very welcome! Thank you very much.
Sascha
Here is the (simplified) XML. Unfortunately, the format is given and I
cannot change it. We can ignore the <metadata> part and the structure of the
<row> elements is always the same.
<?xml version="1.0" encoding="utf-8"?>
<dataset
xmlns="http://xxx.com/schemas/xmldata/1/"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
<metadata>
<item name="Product Name" type="xs:string" length="80"/>
<item name="Product Number" type="xs:double"/>
<item name="Title" type="xs:string" length="150"/>
<item name="Description" Desc" type="xs:string" length="2400"/>
</metadata>
<data>
<row>
<value>Product A</value>
<value>1234</value>
<value>Title A</value>
<value>Description for A</value>
</row>
<row>
<value>Product B</value>
<value>2992</value>
<value>Title B</value>
<value>Description for B</value>
</row>
<row>
<value>Product C</value>
<value>7382</value>
<value>Title C</value>
<value>Description for C</value>
</row>
</data>
</dataset> |