<xsd>
Compiles an XML Schema into a Microsoft.NET Assembly containing types that can marshal back and forth from XML elements and the objects that represent them. Also can create a W3C XML schema from an existing Microsoft.NET Assembly, XML document, or an old XDR format schema.
| Attribute | Description | Required |
|---|---|---|
| failonerror | Determines whether task failure stops the build or is just reported. Default is "true." | False |
| verbose | Task reports detailed build log messages. Default is "false." | False |
| if | If true then the task will be executed; otherwise skipped. Default is "true." | False |
| unless | Opposite of if. If false then the task will be executed; otherwise skipped. Default is "false." | False |
Examples
Compile a schema
<xsd schema="MySchema.xsd" element="MyRootElement"
language="CS" namespace="MyCompany
.MySchema" outputdir="build\bin"
uri="http://MySchema'sTargetNamespace" />
Generate a schema from an Assembly
<xsd assembly="MyAssembly.dll" outputdir="build\Schemas" />
Generate a schema from an XML doc
<xsd xmldoc="MyDoc.xml" outputdir="build\Schemas" />
Generate a schema from an XDR schema
<xsd xdr="MyOldSchema.xdr" outputdir="build\Schemas" />