C # in a Nutshell, Second Edition
| Xsd.exe | XML Schema Definition Tool |
Synopsis
xsd.exe assembly .[dllexe] [/outputdir: dir ] [/type: type1 [/type: type2 ...]] xsd.exe instance .xml [/outputdir: dir ] xsd.exe schema .xdr [/outputdir: dir ] xsd.exe schema .xsd (/classes/dataset) [/e] [/l] [/n] [/o] [/uri]
Description
Generates XML schemas from XDR, XML files, or class information. Can also generate DataSet or class information from a schema.
Examples
xsd foo.xdr xsd bar.dll
Arguments
- assembly .[dllexe]
-
The name of a .NET assembly. Xsd.exe infers a schema from the assembly's types and generates an .xsd file.
- instance .xml
-
The name of an XML document. Xsd.exe infers a schema from it and generates an .xsd file.
- schema .xdr
-
The name of an XML Data Reduced schema document. Xsd.exe converts it to an .xsd file.
- schema .xsd
-
The name of an XML Schema Description Language schema document. Xsd.exe generates either a dataset ( /dataset ) or source code ( /classes ) for types that correspond to the schema.
Options
- /c[lasses]
-
Generates types that correspond to an XML schema.
- /d[ataset]
-
Generates a subclass of DataSet that corresponds to an XML schema.
- /e[lement] : element
-
Specifies a particular element in the XML schema. To specify multiple elements, use this option more than once. By default, Xsd.exe processes all elements.
- /l[anguage] : language
-
Specifies the language for the generated code. Valid options are CS (C#), VB (Visual Basic .NET), JS (JScript.NET), and VJS (J#).
- /n[amespace] : namespace
-
Specifies the namespace for the generated types.
- /nologo
-
Suppresses display of the banner and copyright messages.
- /o[ut] : directory
-
Specifies the directory to store generated files.
- /t[ype] : type
-
Specifies a particular type in the assembly. To specify multiple types, use this option more than once. By default, Xsd.exe processes all types.
- /u[ri] : uri
-
Specifies the URI of the elements in the schema file to process.