Reputation: 6535
Usually, when it comes to xml, I write an xsd scheme file and generate the C# class with xsd.exe. But it would be much simpler to wrtie first the C# class(es) with public properties as need for the XmlSerializer to serialize. Unfortunately you don't get any xml scheme to document that output/interface. Generating an xsd scheme from the generated xml file is quite error-prone, as you cannot guess restrictions or constraints. So what is the best way to generate xsd xml-scheme from a dotnet class?
Upvotes: 4
Views: 482