[ Team LiB ] |
D.11 XML Schema Definition Tool (xsd.exe)XML Schema Definition (XSD) is useful when working with XML schemas that follow the XSD language. With XSD, you can perform the following transformations:
D.11.1 XDR to XSDTo convert an XDR-formatted file to XSD, use the following syntax: xsd [options] file.xdr Note that the file extension .xdr dictates the conversion from XDR to XSD. D.11.2 XML to XSDTo convert an XML-formatted file to XSD, use the following syntax: xsd [options] file.xml Note that the file extension .xml dictates the conversion from XML to XSD. D.11.3 Classes to XSDYou can convert classes to XSD by specifying the runtime assembly file (.exe or .dll extension) as the filename to the utility. You can also specify a particular type within the assembly you want to convert to XSD using the /type flag. The typename can be a wildcard match. If you omit the /type flag, all types in the assembly will be converted. The syntax follows: Xsd [/TYPE:typename] assemblyFile or: Xsd [/T:typename] assemblyFile D.11.4 XSD to ClassesTo convert XSD back to classes, use the /classes or /c flag. You can specify a particular element in the XSD schema to be converted to a class. You can also specify the language for the class source file. The general syntax follows: xsd /CLASSES /ELEMENT:element /NAMESPACE:namespace /LANGUAGE:language /URI:uri file.xsd or: xsd /C E:element /N:namespace /L:language /U:uri file.xsd Note that namespace, language, and uri can be specified only once. D.11.5 XSD to DataSetTo convert XSD to dataset, use the /dataset or /d flag. Again, you can narrow down to a particular element in the XSD schema to be converted. The general syntax follows: xsd /D [/DATASET] file.xsd |
[ Team LiB ] |