Is there a way to emulate using command line with the xsd.exe what happens when you click the 'Create Schema' option under the XML tab in Visual Studio?
I am trying to automate the process of creating schemas from XML in order to create classes using the XSD.
when I use the xsd file.xml command I get an error: Cannot add a column named 'MyXMLElement': a nested table with the same name already belongs to this DataTable. However, it works fine when I use the Create Schema option in VS2010.
<Person xmlns="http://someNamespace/1.0" xmlns:j="http://www.google.com/2.0" xmlns:nc="http://yahoo.com/3.0">
<MainElement>
<j:FirstElement>
<nc:SecondElement>
<nc:Value>something.com</nc:Value>
</nc:SecondElement>
</j:FirstElement>
<nc:FirstElement>
<ThirdElement>
<nc:PersonName>
<nc:Value>SomeName</nc:Value>
</nc:PersonName>
</ThirdElement>
</nc:FirstElement>
</MainElement>
</Person>