Is there an easy way to construct class from a XML. The constructed class will be used to serialize and deserialize XML.
I have an XML with lots of properties and e
There's a round about way:
Using xsd.exe
, you can first create a schema (xsd) from your xml file, which can then be used as input for xsd.exe
to generate classes from the schema.
i.e. (from the command prompt):
xsd.exe myXmlFile.xml
to output myXmlFile.xsd
and next
xsd.exe myXmlFile.xsd
to generate classes from the xsd file.