O'Reilly logo

Java & XML Data Binding by Brett McLaughlin

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

Zeus

Here is the output from the Zeus command-line source generation tool:

[bmclaugh@aragorn Zeus]$ java org.enhydra.zeus.util.DTDSourceGenerator
Usage: java org.enhydra.zeus.util.DTDSourceGenerator
      -constraints=<constraints filename>
     [-outputDir=<output directory>]
     [-collapseSimpleElements=<true | false>]
     [-ignoreIDAttributes=<true | false>]
     [-javaPackage=<Java package name>]
     [-root=<Root Element Name>]

Table A-2 summarizes each option and its purpose.

Table A-2. Zeus DTDSourceGenerator options

Flag

Value

Purpose

-constraints

DTD to parse

Specify the DTD constraint set to Zeus to generate class from.

-javaPackage

Java package

Set package for generated classes.

-outputDir

Destination directory

Specify the directory to put generated classes in.

-collapseSimpleElements

true or false

If true, elements with no attributes are collapsed into their parents and not generated into objects themselves.

-ignoreIDAttributes

true or false

If true, elements with only an ID attribute are also considered simple (see collapseSimpleElements). This is useful when all elements have IDREFs attached to them with no business meaning.

-root

N/A

If a DTD has multiple elements that can be considered the root of a document, this option allows listing of each element. Zeus will use this list for generating classes.

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