How to programmatically generate .NET classes from XSD? (Like xsd.exe do)

.net, c#, schema, xml, xsd

Solution

Look at the System.Xml.Serialization.XmlCodeExporter class.

UPDATE (in case John Saunders didnt bother reading further)

"Xsd.exe uses XmlCodeExporter to generate classes from XML Schema Definition (XSD) documents."

Problem

I'd like to generate the classes the xsd.exe way and not the linqtoxsd way.

Original source