Home > asp.net, xml > Create XSD from XML file

Create XSD from XML file

I recently required to generate XSD file from XML file,

To accomplish this i used built in tool provided in Visual studio itself,

What you need to do is open your xml file, as you open xml file IDE will show up with new option tab available to generate xsd file option.

Also you can do this from command prompt, there is a xsd.exe file located at

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin or C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin,

set this path to command prompt then you can set any below option and it will generate xsd file,

xsd.exe <schema>.xsd /classes|dataset [/e:] [/l:] [/n:] [/o:] [/s] [/uri:]

xsd.exe <assembly>.dll|.exe [/outputdir:] [/type: […]]

xsd.exe <instance>.xml [/outputdir:]

xsd.exe <schema>.xdr [/outputdir:]

Reference: here

Advertisements
Categories: asp.net, xml Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: