Generating Object Classes from XML

I ran into a need for generating classes that xml data can be deserialized into. I generally write this myself but today, I needed to do it faster.

Along came the Visual Studio XSD tool.

Open a VS command prompt.
Type ‘xsd file.xml’. This will generate a file.xsd.
Then type, ‘xsd file.xsd /classes’. This will generate a file.cs file that you can then use to deserialize into.

For more details, check out this cool link


Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

%d bloggers like this: