通过编程序列化类的XSD序列化、XSD

2023-09-04 02:42:14 作者:8.何必当初

有没有一种方法来从C#.NET编程类的XSD?我想带类型信息的序列化对象的XSD(或XML)。

Is there a way to create an XSD from a C# .NET class programatically? I want to serialize objects to xsd (or xml) with type information.

推荐答案

是的;看 XsdDataContractEx​​porter ; MSDN有一个full例如这里。

Yes; look at XsdDataContractExporter; MSDN has a full example here.

替代; XmlSchemaExporter

 
精彩推荐
图片推荐