xsd的使用

根据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 <instance>.xml [/outputdir:]

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.

供一种方法把资料从一种格式转换成另一种标准资料格式表示法,确保在不同的电脑,作业系统及电脑语言中,所有资料代表的意义都是相同的。




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值