开发者

What is the best way to generate xsd xml-scheme from a dotnet class?

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-pr开发者_开发技巧one, as you cannot guess restrictions or constraints. So what is the best way to generate xsd xml-scheme from a dotnet class?


xsd.exe assembly.dll /type:Your.Type.Name
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜