<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
    <header>
        <title>XMLBeans Tools</title>
    </header>
    <body>
        <section>
            <title>XMLBeans Tools</title>

            <p>XMLBeans includes several command-line tools you might find handy as shortcuts
                for common tasks. You'll find these tools in the bin directory of the XMLBeans
                installation or source tree.
            </p>
            <dl>
                <dt>
                    <a href="#dumpxsb">dumpxsb (XSB File Dumper)</a>
                </dt>
                <dd>Prints the contents of an XSB file in human-readable form.</dd>
                <dt>
                    <a href="#inst2xsd">inst2xsd (Instance to Schema Tool)</a>
                </dt>
                <dd>Generates XML schema from XML instance files.</dd>
                <dt>
                    <a href="#scomp">scomp (Schema Compiler)</a>
                </dt>
                <dd>Compiles a schema into XMLBeans classes and metadata.</dd>
                <dt>
                    <a href="#scopy">scopy (Schema Copier)</a>
                </dt>
                <dd>Copies the XML schema at the specified URL to the specified file.</dd>
                <dt>
                    <a href="#sdownload">sdownload (Schema Downloader)</a>
                </dt>
                <dd>Maintains "xsdownload.xml," an index of locally downloaded XSD
                    files. URLs that are specified are downloaded if they aren't already cached.
                    If no files or URLs are specified, all indexed files are relevant.
                </dd>
                <dt>
                    <a href="#sfactor">sfactor (Schema Factoring Tool)</a>
                </dt>
                <dd>Factors redundant definitions out of a set of schemas and uses imports
                    instead.
                </dd>
                <dt>
                    <a href="#svalidate">svalidate (Streaming Instance Validator)</a>
                </dt>
                <dd>Validates a schema definition and instances within the schema.</dd>
                <dt>
                    <a href="#validate">validate (Instance Validator)</a>
                </dt>
                <dd>Validates an instance against a schema.</dd>
                <dt>
                    <a href="#xpretty">xpretty (XML Pretty Printer)</a>
                </dt>
                <dd>Pretty prints the specified XML to the console.</dd>
                <dt>
                    <a href="#xsd2inst">xsd2inst (Schema to Instance Tool)</a>
                </dt>
                <dd>Prints an XML instance from the specified global element using the specified
                    schema.
                </dd>
                <dt>
                    <a href="#xsdtree">xsdtree (Schema Type Hierarchy Printer)</a>
                </dt>
                <dd>Prints an inheritance hierarchy of the types defined in a schema.</dd>
                <dt>
                    <a href="site:anttask">xmlbean Ant task</a>
                </dt>
                <dd>Compiles a set of XSD and/or WSDL files into XMLBeans types.</dd>
            </dl>
        </section>

        <section id="dumpxsb">
            <title>dumpxsb (XSB File Dumper)</title>
            <p>Prints the contents of an XSB file in human-readable form. An XSB file contains
                schema meta information needed to perform tasks such as binding and validation.
                "XSB" stands for XML Schema Binary.
            </p>
            <section>
                <title>Syntax</title>
                <source><![CDATA[
                dumpxsb myfile.xsb
                ]]></source>
            </section>

            <section>
                <title>Options</title>
                <dl>
                    <dt>
                        <em>myfile.xsb</em>
                    </dt>
                    <dd>The name of an XSB file.</dd>
                </dl>
            </section>

            <section>
                <title>Example</title>
                <p>The following command and output example use an XSB file generated by compiling
                    the schema (in EasyPo.xsd) that accompanies the SubstitutionGroup sample.
                </p>
                <source><![CDATA[dumpxsb PurchaseOrderDocument.xsb]]></source>
                <p>Output:</p>
                <source><![CDATA[
                    PurchaseOrderDocument.xsb
                    Magic cookie: da7ababe
                    Major version: 2
                    Minor version: 22
                    Release number: 0
                    Filetype: FILETYPE_SCHEMAPOINTER
                    String pool (2):
                    1 = "schema.system.s633ECC92E6CC0ACA137B11B7B38CA3A8"
                    Type system: schema.system.s633ECC92E6CC0ACA137B11B7B38CA3A8
                ]]></source>
            </section>
        </section>

        <section id="inst2xsd">
            <title>inst2xsd (Instance to Schema Tool)</title>
            <p>Generates XML schema from XML instance files.</p>

            <section>
                <title>Syntax</title>
                <source><![CDATA[
                    inst2xsd [options] instance.xml*
                ]]></source>
            </section>

            <section>
                <title>Options</title>
                <dl>
                    <dt><strong>-design</strong>[<strong>rd</strong>|<strong>ss</strong>|<strong>vb</strong>]
                    </dt>
                    <dd>The XML schema design type to use for the generated schema.
                        <br/>
                        <strong>rd</strong> &#8212; Use russian doll design; local elements and local types.
                        <br/>
                        <strong>ss</strong> &#8212; Use salami slice design; global elements and local types.
                        <br/>
                        <strong>vb</strong>(default) &#8212; Use venetian blind design; local elements and global
                        complex types.
                    </dd>
                    <dt>
                        <strong>-simple-content-types</strong>
                        [<strong>smart</strong> | <strong>string</strong>]
                    </dt>
                    <dd>The manner for detecting content types (leaf text)
                        <br/>
                        <strong>smart</strong>
                        (default) &#8212; Use a likely type, such as xs:byte
                        for a value of "123".
                        <br/>
                        <strong>string</strong> &#8212; Use xs:string as the type.
                    </dd>
                    <dt>
                        <strong>-enumerations</strong>
                        [<strong>never</strong> | <em>number</em>]
                    </dt>
                    <dd>Whether to use enumerations.
                        <br/>
                        <strong>never</strong> &#8212; Never use enumerations.
                        <br/>
                        <em>number</em>
                        (default: 10) &#8212; Use <em>number</em> as the threshold
                        for enumerations. Specifying "2" will create enumerations for elements
                        with no more than two different values.
                    </dd>
                    <dt>
                        <strong>-outDir</strong>
                        [<em>dir</em>]
                    </dt>
                    <dd>The directory for output files.
                        <br/>
                        <em>dir</em> &#8212; Directory path. Default is '.' (the current directory).
                    </dd>
                    <dt>
                        <strong>-outPrefix</strong>
                        [<em>file_name_prefix</em>]
                    </dt>
                    <dd>The prefix for output file names.
                        <br/>
                        <em>file_name_prefix</em> &#8212; Prefix to use. Default is "schema".
                    </dd>
                    <dt>
                        <strong>-validate</strong>
                    </dt>
                    <dd>Validate input instances against generated schemas.</dd>
                    <dt>
                        <strong>-verbose</strong>
                    </dt>
                    <dd>Print more informational messages.</dd>
                    <dt>
                        <strong>-license</strong>
                    </dt>
                    <dd>Print license information.</dd>
                    <dt>
                        <strong>-help</strong>
                    </dt>
                    <dd>Print help information.</dd>
                </dl>
            </section>

            <section>
                <title>v</title>
                <p>The following example generates schema0.xsd from Purchase-Order.xml, with
                    salami slice schema design, simple content types detected where possible, and
                    enumerations limited to elements with four different values.
                </p>
                <source><![CDATA[
                    inst2xsd -design ss -simple-content-types smart -enumerations 4 Purchase-Order.xml
                ]]></source>
            </section>
        </section>

        <section id="scomp">
            <title>scomp (Schema Compiler)</title>
            <p>Compiles schema into Java XMLBeans classes and metadata. Schema-related work
                with XMLBeans begins by compiling schema to generated Java types. You can use
                scomp to compile schema from the command line. XMLBeans also provides an Ant
                task, <a href="site:anttask">xmlbeans</a>, which you can use to compile schemas.
                For run-time schema compilation that doesn't generate files, see the
                org.apache.xmlbeans.XmlBeans.compileXsd
                methods.
            </p>
            <p>For more information about the types resulting from compiling schema, see <a
                    href="site:generatedtypes">Java
                Types Generated from User-Derived Schema Types</a>, <a href="site:builtintypes">
                XMLBeans
                Support for Built-In Schema Types</a>, and <a href="site:generatedmethods">Methods
                for Types Generated From Schema</a>.
            </p>
            <p>For more information on getting started with XMLBeans, see <a href="site:gettingstarted">
                Getting
                Started with XMLBeans</a>.
            </p>
            <section>
                <title>Syntax</title>
                <source><![CDATA[
                    scomp [options] [dirs]* [schemaFile.xsd]* [service.wsdl]* [config.xsdconfig]*
                ]]></source>
            </section>

            <section>
                <title>Options</title>
                <dl>
                    <dt>
                        <strong>-cp</strong>
                        [<em>pathA;pathB;pathC</em>]
                    </dt>
                    <dd>Classpath specifying classes to include during compilation.
                        <br/>
                        <em>pathA;pathB;pathC</em> &#8212; Class search path of directories and
                        JAR files.
                    </dd>
                    <dt>
                        <strong>-d</strong>
                        [<em>dir</em>]
                    </dt>
                    <dd>Target directory for CLASS and XSB files.
                        <br/>
                        <em>dir</em> &#8212; The directory path.
                    </dd>
                    <dt>
                        <strong>-src</strong>
                        [<em>dir</em>]
                    </dt>
                    <dd>Target directory for generated JAVA files.
                        <br/>
                        <em>dir</em> &#8212; The directory path.
                    </dd>
                    <dt>
                        <strong>-srconly</strong>
                    </dt>
                    <dd>Do not compile JAVA files or jar the output.
                        <br/>
                        Note that XSB files are needed in order for CLASS files compiled from the
                        sources to be useful as XMLBeans classes. To get <em>only JAVA files</em>,
                        use -src to specify a directory for the JAVA files. To get <em>JAVA and XSB
                            files in the same directory</em>, use -d to specify a directory that will
                        include both. To get <em>JAVA and XSB files in separate directories</em>,
                        use -src for the JAVA file destination and -d for the XSB file destination.
                    </dd>
                    <dt>
                        <strong>-out</strong>
                        [<em>jarFileName</em>]
                    </dt>
                    <dd>The name of the output JAR that will contain the result of compilation.
                        The default is "xmltypes.jar".
                        <br/>
                        <em>jarFileName</em> &#8212; The name for the JAR containing generated
                        files.
                    </dd>
                    <dt>
                        <strong>-dl</strong>
                    </dt>
                    <dd>Permit network downloads for imports and includes (this permission is off
                        by default).
                    </dd>
                    <dt>
                        <strong>-noupa</strong>
                    </dt>
                    <dd>Do not enforce the unique particle attribution rule.</dd>
                    <dt>
                        <strong>-nopvr</strong>
                    </dt>
                    <dd>Do not enforce the particle valid (restriction) rule.</dd>
                    <dt>
                        <strong>-noann</strong>
                    </dt>
                    <dd>Ignore annotations.</dd>
                    <dt>
                        <strong>-novdoc</strong>
                    </dt>
                    <dd>Do not validate contents of &lt;documentation&gt; elements.</dd>
                    <dt>
                        <strong>-compiler</strong>
                    </dt>
                    <dd>Path to external Java compiler.</dd>
                    <dt>
                        <strong>-ms</strong>
                    </dt>
                    <dd>Initial memory for external Java compiler; the default is "8m".
                    </dd>
                    <dt>
                        <strong>-mx</strong>
                    </dt>
                    <dd>Maximum memory for external Java compiler; the default is "256m".
                    </dd>
                    <dt>
                        <strong>-debug</strong>
                    </dt>
                    <dd>Compile with debug symbols.</dd>
                    <dt>
                        <strong>-quiet</strong>
                    </dt>
                    <dd>Print fewer informational messages.</dd>
                    <dt>
                        <strong>-verbose</strong>
                    </dt>
                    <dd>Print more informational messages.</dd>
                    <dt>
                        <strong>-version</strong>
                    </dt>
                    <dd>Print version information.</dd>
                    <dt>
                        <strong>-license</strong>
                    </dt>
                    <dd>Print license information.</dd>
                    <dt>
                        <strong>-allowmdef</strong>
                        "[<em>namespace</em>] [<em>namespace</em>]
                        [<em>namespace</em>]"
                    </dt>
                    <dd>Ignore multiple defs in given namespaces. Use <code>##local</code> to
                        specify the no-namespace in that list.
                    </dd>
                    <dt>
                        <strong>-catalog</strong>
                        [<em>fileName</em>]
                    </dt>
                    <dd>Catalog file to use for resolving external entities. With this option,
                        scomp uses <code>org.apache.xml.resolver.tools.CatalogResolver</code> for
                        resolving. Note that to use this option, your classpath must include resolver.jar
                        from https://xml.apache.org/commons/components/resolver/index.html). Copy resolver.jar
                        to the XMLBEANS_HOME/lib directory, so that the script can pick it up from
                        there. You can use the <a href="#sdownload">sdownload</a> tool to ensure that
                        required schemas are present for compilation.
                        <br/>
                        <em>fileName &#8212;</em>A path to the catalog file.
                    </dd>
                    <dt>
                        <em>dirs</em>
                    </dt>
                    <dd>Directories containing XSD (and possibly XSDCONFIG) files that should be
                        compiled.
                    </dd>
                    <dt>
                        <em>schemaFile.xsd</em>
                    </dt>
                    <dd>The names of XSD files that should be compiled.</dd>
                    <dt>
                        <em>service.wsdl</em>
                    </dt>
                    <dd>A WSDL file for which types should be generated.</dd>
                    <dt>
                        <em>config.xsdconfig</em>
                    </dt>
                    <dd>The name of an XSDCONFIG file. Use an XSDCONFIG file to guide the naming
                        of generated classes and packages. Without an XSDCONFIG file, scomp uses the
                        schema's type names and URI for classes and packages.
                    </dd>
                </dl>
            </section>

            <section>
                <title>Example</title>
                <p>In the following example, scomp compiles EasyPO.xsd, guiding type naming with
                    po.xsdconfig. scomp puts generated CLASS and XSB files into a classes directory
                    one level up, and JAVA source files into a src directory one level up. Source
                    files will be compatible with Java version 1.5.
                </p>
                <source><![CDATA[
                    scomp -d ..\classes -src ..\src -javasource 1.5 EasyPO.xsd po.xsdconfig
                ]]></source>
                <p>Here, scomp compiles all of the contents of the schemas directory and puts
                    the generated files into poschema.jar one level up.
                </p>
                <source><![CDATA[
                    scomp -out ..\poschema.jar schemas
                ]]></source>
                <p>The following example generates JAVA source and XSB files from the schema
                    in EasyPO.xsd. No CLASS files are generated, and the JAVA and XSB files are
                    put into src and xsb directories, respectively.
                </p>
                <source><![CDATA[
                    scomp -srconly -src ..\src -d ..\xsb EasyPO.xsd
                ]]></source>
                <p>When the schema features imports or includes and you want to use a catalog,
                    you can tell scomp to use the default catalog resolver (<code>
                        org.apache.xml.resolver.tools.CatalogResolver</code>);
                    you specify a catalog file with the -catalog option, as in the example below.
                    (Note that this requires resolver.jar, as noted above for the -catalog option.)
                    In this example, scomp compiles schemaThatUsesRequiredSchema.xsd into myschemas.jar,
                    resolving imports from requiredSchema.xsd through xsdownload.xml. The
                    <a href="#sdownload">sdownload</a>
                    tool is executed first &#8212; this ensures that requiredSchema.xsd is present
                    for compilation, but does not actually download requiredSchema.xsd unless the
                    URL at which it's found isn't already cached. This is more efficient than using
                    scomp's -dl option, which attempts to download every time.
                </p>
                <source><![CDATA[
                    sdownload "http://some.org/requiredSchema.xsd"
                    scomp -out ..\myschemas.jar -catalog xsdownload.xml schemaThatUsesRequiredSchema.xsd
                ]]></source>
                <p>When a schema features multiple element declarations of the same qname, such
                    as multiple &lt;xs:any&gt; particles, you might want to disable to "unique
                    particle validation" rule, which would ordinarily invalidate the schema.
                    To do this, use the -noupa option, as in the following example.
                </p>
                <source><![CDATA[
                    scomp -out ..\myschemas.jar -noupa schemas
                ]]></source>
            </section>
        </section>

        <section id="scopy">
            <title>scopy (Schema Copier)</title>
            <p>Copies the XML schema at the specified URL to the specified file.</p>

            <section>
                <title>Syntax</title>
                <source><![CDATA[
                    schemacopy sourceurl [targetfile]
                ]]></source>
            </section>

            <section>
                <title>Options</title>
                <dl>
                    <dt>
                        <strong>sourceurl</strong>
                    </dt>
                    <dd>The URL at which the schema is located.</dd>
                    <dt>
                        <em>targetfile</em>
                    </dt>
                    <dd>The file to which the schema should be copied.</dd>
                </dl>
            </section>
        </section>

        <section id="sdownload">
            <title>sdownload (Schema Downloader)</title>
            <p>Maintains "xsdownload.xml," an index of locally downloaded XSD files.
                URLs that are specified are downloaded if they aren't already cached. If no
                files or URLs are specified, all indexed files are relevant.
            </p>
            <p>You can use this tool when using <a href="#scomp">scomp</a>, in conjunction
                with scomp's -catalog option, to ensure the presence of schemas that are required
                for compilation because they're imported or included. This is an alternative
                to using scomp's -dl option, which would hit the Internet on every invocation
                of scomp. When you use sdownload with -catalog, the download occurs only if
                the URL is not already cached. See the scomp section for an example.
            </p>

            <section>
                <title>Syntax</title>
                <source><![CDATA[
                    sdownload [-dir directory] [-refresh] [-recurse] [-sync] [url/file]
                ]]></source>
            </section>

            <section>
                <title>Options</title>
                <dl>
                    <dt>
                        <strong>-dir</strong>
                        <em>directory</em>
                    </dt>
                    <dd>The directory for the xsdownload.xml file (the default is ".").<br/>
                        <em>directory</em> &#8212; The directory path.
                    </dd>
                    <dt>
                        <strong>-sync</strong>
                    </dt>
                    <dd>Synchronize the index to any local XSD files in the tree.</dd>
                    <dt>
                        <strong>-recurse</strong>
                    </dt>
                    <dd>Recursively download imported and included XSD files.</dd>
                    <dt>
                        <strong>-refresh</strong>
                    </dt>
                    <dd>Re-download all indexed XSD files.</dd>
                </dl>
            </section>
        </section>

        <section id="sfactor">
            <title>sfactor (Schema Factoring Tool)</title>

            <p>Factors redundant definitions out of a set of schemas and uses imports instead.
            </p>

            <section>
                <title>Syntax</title>
                <source><![CDATA[
                    sfactor [-import common.xsd] [-out outputdir] inputdir [-license]
                ]]></source>
            </section>

            <section>
                <title>Options</title>

                <dl>
                    <dt>
                        <strong>-import</strong>
                    </dt>
                    <dd>The XSD file to contain redundant definitions for importing.<br/>
                        <em>common.xsd</em> &#8212; A path to the file.
                    </dd>
                    <dt>
                        <strong>-out</strong>
                        <em>outputdir</em>
                    </dt>
                    <dd>The directory into which to place XSD files resulting from refactoring,
                        plus a commonly imported common.xsd.
                    </dd>
                    <dt>inputdir</dt>
                    <dd>The directory containing the XSD files with redundant definitions.</dd>
                    <dt>-license</dt>
                    <dd>Print license information.</dd>
                </dl>
            </section>
        </section>

        <section id="svalidate">
            <title>svalidate (Streaming Instance Validator)</title>

            <p>Validates the specified instance against the specified schema. Unlike the
                <a href="#validate">validate</a>
                tool, svalidate uses a streaming model through
                which you can validate much larger instances with less memory (if the schema
                permits it).
            </p>

            <section>
                <title>Syntax</title>

                <source><![CDATA[
                    svalidate [options] schema.xsd instance.xml
                ]]></source>
            </section>

            <section>
                <title>Options</title>

                <dl>
                    <dt>
                        <strong>-dl</strong>
                    </dt>
                    <dd>Enable network downloads for imports and includes.</dd>
                    <dt>
                        <strong>-nopvr</strong>
                    </dt>
                    <dd>Disable particle valid (restriction) rule.</dd>
                    <dt>
                        <strong>-noupa</strong>
                    </dt>
                    <dd>Disable unique particle attribution rule.</dd>
                    <dt>
                        <strong>-license</strong>
                    </dt>
                    <dd>Print license information.</dd>
                    <dt>
                        <em>schema.xsd</em>
                    </dt>
                    <dd>The schema against which to validate.</dd>
                    <dt><em>instance.xml</em>
                    </dt>
                    <dd>The instance to validate.</dd>
                </dl>
            </section>
        </section>

        <section id="validate">
            <title>validate (Instance Validator)</title>

            <p>Validates a the specified instance against the specified schema. Compare this
                tool with the <a href="#svalidate">svalidate</a> tool, which is useful for validating
                very large documents.
            </p>

            <section>
                <title>Syntax</title>

                <source><![CDATA[
                    validate [options] schema.xsd instance.xml
                ]]></source>
            </section>

            <section>
                <title>Options</title>

                <dl>
                    <dt>
                        <strong>-dl</strong>
                    </dt>
                    <dd>Enable network downloads for imports and includes.</dd>
                    <dt>
                        <strong>-nopvr</strong>
                    </dt>
                    <dd>Disable particle valid (restriction) rule.</dd>
                    <dt>
                        <strong>-noupa</strong>
                    </dt>
                    <dd>Disable unique particle attribution rule.</dd>
                    <dt>
                        <strong>-license</strong>
                    </dt>
                    <dd>Print license information.</dd>
                    <dt>
                        <em>schema.xsd</em>
                    </dt>
                    <dd>The schema against which to validate.</dd>
                    <dt>
                        <em>instance.xml</em>
                    </dt>
                    <dd>The instance to validate.</dd>
                </dl>
            </section>

            <section>
                <title>Example</title>
                <p>The following simple example validates PurchaseOrder.xml against EasyPO.xsd.
                </p>
                <source><![CDATA[
                    validate ..\schemas\EasyPO.xsd PurchaseOrder.xml
                ]]></source>
                <p>In this example, MySchema imports types from another schema and also includes
                    multiple particles defined as &lt;xsd:any&gt; types. The validate command here
                    locates the external schemas for importing (providing there is network access
                    to the schemas) and ignores the validation rule whereby multiple particles of
                    the same qname render the schema invalid.
                </p>
                <source><![CDATA[
                    validate -dl -noupa ..\schemas\MySchema.xsd AnInstance.xml
                ]]></source>
            </section>
        </section>

        <section id="xpretty">
            <title>xpretty (XML Pretty Printer)</title>
            <p>Pretty prints the specified XML to the console.</p>

            <section>
                <title>Syntax</title>
                <source><![CDATA[
                    xpretty [options] file.xml
                ]]></source>
            </section>

            <section>
                <title>Options</title>

                <dl>
                    <dt>
                        <strong>-indent</strong>
                        <em>numberOfSpaces</em>
                    </dt>
                    <dd>Indent the specified number of spaces.<br/>
                        <em>numberOfSpaces</em> &#8212; The number of spaces to indent.
                    </dd>
                    <dt>
                        <strong>-license</strong>
                    </dt>
                    <dd>Print license information.</dd>
                </dl>
            </section>
        </section>

        <section id="xsd2inst">
            <title>xsd2inst (Schema to Instance Tool)</title>

            <p>Prints an XML instance from the specified global element using the specified
                schema.
            </p>

            <section>
                <title>Syntax</title>
                <source><![CDATA[
                    xsd2inst schemafile.xsd -name globalElementName
                ]]></source>
            </section>

            <section>
                <title>Options</title>

                <dl>
                    <dt>
                        <em>schemafile.xsd</em>
                    </dt>
                    <dd>The schema file defining the element to print.</dd>
                    <dt>
                        <strong>-name</strong>
                    </dt>
                    <dd>The name of the global element<br/>
                    <em>globalElementName</em>&#8212; The local name of the global element
                        to use as the root of the printed instance.
                    </dd>
                </dl>
            </section>

            <section>
                <title>Example</title>
                <p>The following command and output use the schema that accompanies the SubstitutionGroup
                    sample.
                </p>
                <source><![CDATA[xsd2inst easypo.xsd -name invoice-header]]></source>
                <p>Output</p>
                <source><![CDATA[
                    <eas:invoice-header xmlns:eas="http://xmlbeans.apache.org/samples/substitutiongroup/easypo">
                        <eas:ship-to>
                            <eas:name>string</eas:name>
                            <eas:address>string</eas:address>
                        </eas:ship-to>
                        <eas:bill-to>
                            <eas:name>string</eas:name>
                            <eas:address>string</eas:address>
                        </eas:bill-to>
                        <!--Optional:-->
                        <eas:product id="3"/>
                        <!--Optional:-->
                        <eas:comment>string</eas:comment>
                    </eas:invoice-header>
                ]]></source>
            </section>
        </section>

        <section id="xsdtree">
            <title>xsdtree (Schema Type Hierarchy Printer)</title>
            <p>Prints inheritance hierarchy of types defined in a schema.</p>

            <section>
                <title>Syntax</title>
                <source><![CDATA[
                    xsdtree [-noanon] [-nopvr] [-noupa] [-partial] [-license] schemafile.xsd*
                ]]></source>
            </section>

            <section>
                <title>Options</title>

                <dl>
                    <dt>
                        <strong>-noanon</strong>
                    </dt>
                    <dd>Don't include anonymous types in the tree.</dd>
                    <dt>
                        <strong>-nopvr</strong>
                    </dt>
                    <dd>Disable particle valid (restriction) rule.</dd>
                    <dt>
                        <strong>-noupa</strong>
                    </dt>
                    <dd>Disable unique particle attribution rule.</dd>
                    <dt>
                        <strong>-partial</strong>
                    </dt>
                    <dd>Print only part of the hierarchy.</dd>
                    <dt>
                        <strong>-license</strong>
                    </dt>
                    <dd>Print license information.</dd>
                    <dt>
                        <em>schemafile.xsd</em>
                    </dt>
                    <dd>The file containing the schema whose hierarchy should be printed.</dd>
                </dl>
            </section>

            <section>
                <title>Example</title>

                <p>The following command and output use the schema that accompanies the SubstitutionGroup
                    sample.
                </p>
                <source><![CDATA[
                    xsdtree easypo.xsd
                ]]></source>
                <p>Output:</p>
                <source><![CDATA[
                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:eas="http://xmlbeans.apache.org/samples/substitutiongroup/easypo"
                    +-xs:anyType (builtin)
                    +-xs:anySimpleType (builtin)
                    | +-xs:string (builtin)
                    | +-xs:normalizedString (builtin)
                    | +-xs:token (builtin)
                    | +-type of color element in eas:clothing-type (enumeration)
                    +-type of element eas:invoice-header
                    +-type of element eas:purchase-order
                    +-eas:product-type
                    | +-eas:clothing-type
                    | +-eas:book-type
                    +-eas:name-address
                ]]></source>
            </section>
        </section>

        <section id="xmlbeans_ant">
            <title>xmlbean Ant task</title>

            <p>Compiles a set of XSD and/or WSDL files into XMLBeans types. See <a href="site:anttask">xmlbean
                Ant Task
            </a> for more complete documentation on the task.
            </p>
        </section>

        <section id="relatedtopics">
            <title>Related Topics</title>

            <p>
                <a href="site:gettingstarted">Getting Started with XMLBeans</a>
            </p>
        </section>
    </body>
</document>