Recently I was using Visual Studio 2005’s “Create Schema” feature to generate an XML Schema Document (XSD) from an XML file
However I began to run into trouble with larger documents for which Visual Studio was throwing me back the following error:

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:
2. Double-click the source adapter to open its editor and browse to the XML file for which you want to create an XSD:
3. Specify a name and location for the XSD file and click “Generate XSD…”
And there you have it. In this case the XSD that I generated was for a Live Messenger conversation history file:
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