Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

SSIS: XML not being inserted into table Expand / Collapse
Posted Friday, August 17, 2012 8:06 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, May 27, 2015 4:16 AM
Points: 25, Visits: 62
In SSIS I have a generated XML file based on a webservice. I need to read the file to generate a dataset.
The problem that I have is that the "XML Source" is not reading the file correctly. I'm not getting any data. This fact is based on a Data Viewer that I have defined.

There is an inline schema defined in the XML, so I don't need to define a location for the XSD location.
When I click Columns in the "XML Source Editor" I see the different columns that are available.

XML Source:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table1">
<xs:element name="companyid" type="xs:decimal" minOccurs="0" />
<xs:element name="companyname" type="xs:string" minOccurs="0" />
<xs:element name="straatnaam" type="xs:string" minOccurs="0" />
<xs:element name="huisnummer" type="xs:string" minOccurs="0" />
<xs:element name="postcode" type="xs:string" minOccurs="0" />
<xs:element name="plaatsnaam" type="xs:string" minOccurs="0" />
<xs:element name="provincie" type="xs:string" minOccurs="0" />
<xs:element name="land" type="xs:string" minOccurs="0" />
<xs:element name="hrovernameorgrol" type="xs:unsignedByte" minOccurs="0" />
<xs:element name="supporttelefoon" type="xs:string" minOccurs="0" />
<xs:element name="supportemail" type="xs:string" minOccurs="0" />
<xs:element name="faxnummer" type="xs:string" minOccurs="0" />
<xs:element name="lastupdate" type="xs:string" minOccurs="0" />
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<Table1 diffgr:id="Table11" msdata:rowOrder="0">
<postcode>1111 AA</postcode>
<faxnummer />

Any ideas on how to read the XML file so that I can generate a dataset(object) out of this XML?

Input much appreciated!!
Post #1346562
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse