O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Xsd.exe — XML Schema Definition Tool

Synopsis

xsd.exe assembly.[dll|exe] [/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 .[dll|exe]

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), and JS (JScript.NET).

/n[amespace]: namespace

Specifies the namespace for the generated types.

/nologo ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required