根据xsd文件生成类或数据集:
xsd.exe <schema>.xsd /classes|dataset [/e:] [/l:] [/n:] [/o:] [/s] [/uri:]
以下三行是根据dll/exe/xml/xdr, 生成xml架构定义文件(xsd文件)
xsd.exe <assembly>.dll|.exe [/outputdir:] [/type: [...]]xsd.exe <schema>.xdr [/outputdir:]
参数选项:
/classes
生成类,缩写'/c'.
/dataset
Generate sub-classed DataSet for this schema. Short form is '/d'.
/enableLinqDataSet
Generate LINQ-enabled sub-classed Dataset for the schemas provided. Short f
orm is '/eld'.
/element:<element>
Element from schema to process. Short form is '/e:'.
/fields
使用字段而不是属性.,缩写 '/f'.
/order
Generate explicit order identifiers on all particle members.
/enableDataBinding
Implement INotifyPropertyChanged interface on all generated types
to enable data binding. Short form is '/edb'.
/language:<language>
指定语言 'CS', 'VB', 'JS', 'VJS', 'CPP' or provide a fully-qualified name for a class implementing
System.CodeDom.Compiler.CodeDomProvider. The default language
is 'CS' (CSharp). Short form is '/l:'.
/namespace:<namespace>
命名空间. The default namespace
is the global namespace. Short form is '/n:'.
/nologo
Suppresses the banner.
/out:<directoryName>
The output directory to create files in. The default
is the current directory. Short form is '/o:'.
/type:<type>
可以指定多个类型参与生成架构定义文件
If no types are provided, then schemas for all types in an assembly
are generated. Short form is '/t:'.
/uri:<uri>
Uri of elements from schema to process. Short form is '/u:'.
- ADVANCED -
/parameters:<file>
参数文件. Short form is '/p:'.
注:
xdr : external Data Representation.
提供一种方法把资料从一种格式转换成另一种标准资料格式表示法,确保在不同的电脑,作业系统及电脑语言中,所有资料代表的意义都是相同的。