C # What is the easiest way to create XSD for xml-serializable class

First of all, I am new to this topic, and having collected a lot of background information, I became even more confused.

I have several classes, all of them are serializable, some implement IXmlSerializable. Classes are tagged [XmlRoot], [XmlAttribute], etc. In the appropriate places.

I am wondering how to create a simple XSD for each class using existing tags. I am interested in both the manual and the software approach. If possible, I would prefer to use the tools integrated into VS2008.

+3
source share
1 answer

, IXmlSerializable , . :

xsd.exe <assembly>.dll|.exe [/outputdir:] [/type: [...]]

MSDN:

/t [ype]: typename . . typename namespace, Xsd.exe . typename , . typename character (*), , *. / option, Xsd.exe .

...

XSD XML- . XML, System.Xml.Serialization.XmlSerializer.

+4

Source: https://habr.com/ru/post/1703427/


All Articles