Say vs comes with a tool that can convert XSD or XML-formatted files into entity classes, probably in the following format
Use the VS2005 tool XSD.exe(Sdk/v2.0/bin/xsd.exe) to automatically generate entity classes:
XSD/C/namespace:mycompany/language:cs temp1.xsd
You can also generate a class of DataSet type:
Xsd/dataset/language:cs temp1.xsd
(The class file and XSD can be converted to each other, that is, you can generate the class first and then automatically generate the XSD)
Automatically read XML data to entity classes:
But this time no use, or first preserved, to be used later. The main thing to note is
1. Use the command line tool: Can be the VS comes with the developer command prompt, pay attention to the permissions, in order to avoid some paths inaccessible, we recommend that you right-click Run as Administrator
2. Note The path: The path of Xsd.exe is generally in C:\Program Files (x86) \microsoft Visual Studio 11.0>.
3, the path of the generated CS file: By default or in the path of VS C:\Program files (x86) \microsoft Visual Studio 11.0>.
4, the file path is executed: This can be set by itself.
XSD to entity class