Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically generate .NET classes from XSD? (Like xsd.exe do)

Tags:

c#

.net

xml

schema

xsd

I'd like to generate the classes the xsd.exe way and not the linqtoxsd way.

like image 714
Ran Avatar asked Dec 01 '22 07:12

Ran


1 Answers

Look at the System.Xml.Serialization.XmlCodeExporter class.

UPDATE (in case John Saunders didnt bother reading further)

"Xsd.exe uses XmlCodeExporter to generate classes from XML Schema Definition (XSD) documents."

like image 179
leppie Avatar answered Dec 04 '22 10:12

leppie