youcef seg
youcef seg

Reputation: 13

How can I load XML files with different schema into database using XML Source component?

I have a folder that contains many XML files that have different XML schemas. The XML source Component identified in all these files 4 tables, 3 from it are of identical form but it is one table that has a number of columns which varies depending on the XML file. so when I work with XML source Component I have a problem with the xsd file. The XML source component does not work without the right xsd file.

Is there a way to generate xsd file dynamically for each xml file because I work with a ForEach loop or another method to load XML files without generating their xsd.

If the answer includes script component, I am using c#.

Upvotes: 1

Views: 383

Answers (1)

Mike Honey
Mike Honey

Reputation: 15037

Your XSD file should include the superset of all attributes. The XML source component then wont care if some attributes do not appear in a particular XML file - it will pass nulls for those values.

Upvotes: 1

Related Questions