Does anyone know of any T4 templates for generating classes from xsd?

I am studying some work update classes created from xsds. I think this would be very useful for T4 templates, but I don't see examples of how people do this. Essentially, I would like to do what Linq to XSD did , but without including alpha build goals in the production solution.

Any relevant links there?


Now wiki. Save your answers here.

+5
source share
3 answers

I am currently using xsd2code.net, find it here: http://xsd2code.codeplex.com/ . Many advantages:

  • , /

  • ( xsd, , )

, xsd, , xsd (, xsd.exe). , .

, T4 , T4 XSD , .

+3

, XSD . , . / DataSet - XSD . , , . , XSD , , , DataSet.

If you decide to go further and use XSD as a model, you probably want to choose a simple subset sufficient for what you need to create. One approach may be to load an XSD schema into a DataSet and use that DataSet as a model. DataSet metadata is much easier to access than general-purpose XSD. It will also allow you to use the existing DataSet designer in Visual Studio to edit your models.

+1
source

All Articles