Subscribe to the RSS feed then follow me on twitter at @mrlacey (misc) and @wpug (WPDev news)

## Tuesday, June 02, 2009

### In C#: generate a class for an XML file

For my own reference as musch as anything.

Often it's useful to have a helper class to work with a complicated XML document. Unfortunately, I seem to most often need to do this for documents for which there is no official schema.

Here's a quick way to get things done using xsd.exe.

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\xsd.exe"config.xml"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\xsd.exe"config.xsd /classes /language:CS /namespace:MyNamespace/out:"C:\path\to\desired\dir"

Are you a Windows Phone, Nokia-X (Android) or Asha developer? If so, you could be getting rewards for the apps you build and the success they achieve by joining the DVLUP program.