Skip to main content

skip to main content

developerWorks  >  Java technology | XML | Open source  >

JiBX 1.2, Part 1: Java code to XML schema

Improve schema quality with custom conversion of Java data models to and from XML documents

developerWorks
Go to the previous pagePage 6 of 11 Go to the next page

Document options
PDF format - Fits A4 and Letter

PDF - Fits A4 and Letter
188 KB (29 pages)

Get Adobe® Reader®

Sample code


My developerWorks needs you!

Connect to your technical community


Rate this tutorial

Help us improve this content


BindGen command-line parameters

BindGen supports several command-line parameters in addition to those used in the tutorial code. Table 1 lists the most important options:


Table 1. BuildGen command-line options
CommandPurpose
-b nameGenerated root binding definition file name (default name is binding.xml)
-c pathPath to input customizations file
-n uri=name,...Give schema namespace URI and file-name pairs (default generates file names from schema namespace URIs)
-p path,...Paths for loading Java class files (default is the classpath used to run BindGen)
-s path,...Paths for loading Java source files (source is not used by default)
-t pathTarget directory path for generated output (default is current directory)
-wWipe all files from target directory before generating output (ignored if the target directory is the same as the current directory)

You can also pass global customizations to BindGen as command-line parameters, without the need to create a customizations file, by using -- as a special prefix to the customization attribute value. So to set the same global options as used in the Listing 13 customizations, you'd add --property-access=true --force-mapping=true to the BindGen command line. No quotes are needed for the attribute value when you use this technique. If you want to set a customization that takes a list of multiple values, just use commas rather than spaces as separators between the individual values (so to ignore the prefixes m_ and s_ on field names, for instance, you'd use the command line parameter --strip-prefixes=m_,s_).



Back to top



Go to the previous pagePage 6 of 11 Go to the next page