- Find XSD.exe on your PC. Its a .net tool.
- Assuming xml name is Statements.xml, run the following:
xsd.exe Statements.xml - This generates a Statements.xsd file.
- Now run this:
xsd.exe /dataset /language:CS Statements.xsd - This generates Statements.cs, which is fairly useless unless the XML is perfect. At least you have the class names and the properties stubbed out. I just copy and paste these.
A collection of useful code snippets for getting CRM to do what you want it to do. Note that none of this necessarily represents best practices; and all of it should be considered the mere ramblings of a programmer learning how to use CRM 2011.
Tuesday, April 30, 2013
Create C# Classes from XML
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment