BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
Schemas, xsd, xdr
Learn XSD Schemas .NET Tutorial
Conversion of genealogical files to XML with a DTD
AccessXML
Sorting by date without using a schema
Validating and enforcing a list of attribute values
Entity name support without DTDs
The Loss of Formatting When Adding a Schema
simple xml notepad
Schemas using DBMS_XMLQuery Package
Tips for Designing a DTD - Part 1 of 4
Tips for Designing a DTD- Part 2 of 4 : Semi-Structured Documents
Tips for Designing a DTD- Part 3 of 4 : Database Oriented Data
Tips for Designing a DTD- Part 4 of 4 : Object Oriented Data
Getting the value of an element with optional subelements
XML Code Generator: Generating Wrapper Classes from an XML Schema
What is WDDX?
XSLT Stylesheet for summarizing the structure of an XML document
Validating XML with Schemas
Punctuated Changes In XML Documents
XMLStarlet Command Line XML Toolkit
<< reBlogger
SEO >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :393

 

Convert XDR to XSD

In addition to generating classes from schema, the tool performs a number of other XML-related conversions that come in handy during development work. Table C.1 lists all the different options and their invocation syntax.

1.1            Table C.1 Syntax of the xsd tool. The tool will identify the input file by the extension. Each conversion option offers command line options to customize the output.

Conversion Option

Call syntax

Convert an XDR schema to XSD format.

xsd file.xdr [/o:directory]

Derive an XML schema from an XML document.

xsd file.xml [/o:directory]

Generate classes from an XSD schema. If a schema includes or imports other schemas you have to explicitly specify on the command line as well. The tool does not follow the schemaLocation hint.

xsd file1.xsd file2.xsd … /c
    [/e:element]

    [/l:language]

    [/n:namespace]

    [/o:directory]

    [/u:uri]

Generate a strongly-typed DataSet from an XSD schema.

xsd file1.xsd file2.xsd … /d    

    [/l:language]

    [/n:namespace]

    [/o:directory]

Generate a schema from classes in a compiled assembly.

xsd {file.dll | file.exe}

       [/o:directory]

       [/t:typename [...]]

XSD command line options

We can customize each conversion the tool performs through a number of command-line options. For example, you can select which classes you want to export from a schema.  Table C.2 gives a complete overview of the available options.

1.2            Table C.2 Command line options of the XSD Schema Definition Tool. The options select item to export from the input file and customize the output of the tool.

Option

Description

/h[elp] or /?

Displays help about the command syntax and the available options to customize the behavior of the tool.

/o[utputdir]:directory

Specifies the output directory for the generated files.

/c[lasses]

Specifies to create .NET classes for use with the XmlSerializer from the specified schema. The output can be further customized with the /e, /u, /n and /l options.

/d[ataset]

Specifies to create a typed DataSet class from the specified schema. The output can be further customized with the /n and /l options.

/e[lement]:element

Selects a top-level element in the schema for which to generate code. Multiple /e options can be used to select multiple elements.

/l[anguage]:language

Specifies the programming language for the generated classes. Possible options are: ‘CS’ for C#, ‘VB’ for Visual Basic.NET and ‘JS’ for Jscript. If no language is specified the tool produces output in C#.

The /l option can also identify the fully qualified name for a CodeDomProvider of a different language.

/n[amespace]:namespace

Specifies the .NET namespace for the generated classes.

/u[ri]:uri

Selects top-level elements from the specified namespace. A /u parameter can be combined with a /e parameter.

/t[ype]:typename

Selects types from an assembly to include in the generated schema. Multiple /t option can be supplied to select multiple types. The

typename may be qualified with a .NET namespace. If no namespace is specified the tool will include elements for all classes matching typename. The option can also specify a wildcard pattern if typename ends with an asterisk character (*) to select a number of classes.


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

An immediate job opportunity as a B
Software Developers Needed in Charl
Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C

View all Jobs (Add yours)
View all CV (Add yours)



answering service
gotomeeting
swimming pool contractor
conference call
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP