Separate the ‘what’ and the ‘how’ with xsd.exe

In case you’ve not come across it there’s an extremely useful command line utility in the Visual Studio tools, the XML Schema Definition Tool xsd.exe. It’s particularly important in separating the ‘what’, the system requirements, and the ‘how’, the system architecture.

An example of using it would be defining your application’s FooStatus XSD using Altova’s XMLSpy and then generating your FooStatus class. The class can be generated with the following command line:
C:\>xsd FooStatus.xsd /classes.

This is a painless way of quickly getting a usable business object. The best part of using xsd? The process is completely reversible. If you want to start by generating your class and then create a schema from it you can. Take a look at what else xsd can do for you when you’ve a spare moment – it’ll save you a lot of effort!

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 )

Google photo

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