Saturday, June 14, 2014

Generate C# class from XML

Using XSD

from visual studio tools menu run "Developer Command Prompt for VS2013" as administrator

switch to the directory where your xml file exists using "cd yourxmlfolder"
then type

d:\yourxmlfolder> xsd yourxmlfile.xml

this will generate a yourxmlfile.xsd

then type

d:\yourxmlfolder> xsd yourxmlfile.xsd /classes

and your done

No comments:

Post a Comment