Welcome to blogs.conchango.com Sign in | Join | Help

Welcome to blogs.conchango.com

SSIS Junkie

Generating XML Schema Documents using SSIS

Recently I was using Visual Studio 2005’s “Create Schema” feature to generate an XML Schema Document (XSD) from an XML file

Visual Studio generate schemaHowever I began to run into trouble with larger documents for which Visual Studio was throwing me back the following error:

insufficient memory to contine the execution of the program

 

That is when my colleague David Portas reminded me that Business Intelligence Development Studio for SSIS has the ability to generate XSDs too -provided by the XML Source adapter- and in this case it worked where Visual Studio had already tried but failed. Here are the steps that you can follow to use it (I’m assuming that you have a working knowledge of SSIS):

1. Create a new dataflow and drag in an XML Source adapter from the toolbox:

xml source adapter ssis

2. Double-click the source adapter to open its editor and browse to the XML file for which you want to create an XSD:

xml source adapter editor ssis

3. Specify a name and location for the XSD file and click “Generate XSD…”

xml source adapter editor ssis

And there you have it. In this case the XSD that I generated was for a Live Messenger conversation history file:

Live messenger conversation history xsd

 

I find it rather peculiar that SSIS’s XSD generation works where Visual Studio’s sometimes does not; one would have thought the Visual Studio function would be more optimised given that XSD generation is more core functionality there than it ordinarily would be for SSIS.

Hope this helps.

-Jamie

Published 15 December 2008 13:36 by jamie.thomson

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

DSmith said:

One problem that I have run into with generating XSDs from XML files in BIDS is that element tags have restrictions on characters that other XSD generators will allow.  In my specific case, I am processing XML output files from an HL7 loader.  There are periods in the element names, and BIDS calls them invalid.  I had to resort to Liquid XML Studio, which will allow the periods to build my XSDs.  

December 15, 2008 15:12
 

jamie.thomson said:

Interesting, thanks. not all good news then!

December 15, 2008 15:43
 

Dew Drop - December 16, 2008 | Alvin Ashcraft's Morning Dew said:

December 16, 2008 16:00

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems