XML Source imports NULL
hi all i could not find a topic to solve my problem. i want to import data from an xml file, but in a certain column, i get null-values. i tried all and end up using a very small xml file... with the same result. here is my xml file: <?xml version="1.0" encoding="utf-8" standalone="no"?> <invoice:request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:invoice="http://www.xmlData.ch/xmlInvoice/XSD" xsi:schemaLocation="http://www.xmlData.ch/xmlInvoice/XSD MDInvoiceRequest_400.xsd" role="production"> <invoice:person> <invoice:familyname>Hero</invoice:familyname> <invoice:givenname>petro1</invoice:givenname> <invoice:givenname>petro2</invoice:givenname> </invoice:person> </invoice:request> here is my xsd file (generated from ssis 2008 R2): <?xml version="1.0"?> <xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:invoice="http://www.xmlData.ch/xmlInvoice/XSD" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.xmlData.ch/xmlInvoice/XSD" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="request"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="person"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="familyname" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="2" name="givenname" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="role" type="xs:string" use="optional" /> </xs:complexType> </xs:element> </xs:schema> i simply use a data flow task with the xml source and a data convertion. and of course i use a data view grid to see whats comming.... NULL! i also changed the xml and xsd file, so there is no "familyname"... but its ending up the same. i'm new in ssis, but i think an easy file like this should be easy to import... thanks for helping petro
December 29th, 2010 1:27pm

Check if in the source you get all the columns you need. I guess you only operate on "person". This is because it is the top element.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
December 29th, 2010 2:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics