我创建一个XML文件,并有一个XSD文件对着干。
I'm creating an xml file and have an XSD file to work against.
我敢肯定,我记得读书的地方,在给定的XSD C#可以自动地创建类的对象。所以,如果我有一个XML元素的地址,我可以有一个使用XSD创建类的必需属性生成的C#类。
I'm sure I remember reading somewhere that C# can automagically create class objects when given an XSD. So if I have an address element in XML I can have a generated C# class that uses the xsd to create the required properties of the class.
例如<联系地址><后code>< /后code><电话>< /电话>
将映射到一类称为地址与性能张贴code和电话。
would map to a class called Address with properties postcode and phone.
是这样的事情可能还是我的梦想呢?
Is this sort of thing possible or did I dream it?
使用的 XSD.EXE 在.NET SDK。
use xsd.exe in the .net sdk.
使用/ C开关生成类