Appendix A. Tools Reference
This appendix deals with the tools used by each data binding framework. The schema compiler tools often have numerous command-line switches available to them, and keeping up with them can be a bit of a pain. This appendix should help.
JAXB
Here’s a summary of the command-line JAXB class generation tool:
C:\dev\jaxb-1.0-ea\lib>java com.sun.tools.xjc.Main Usage: xjc <schema> [ <binding-schema> ] [ -d <directory> ] [ -roots <element-list> ]
Table A-1 lists the meaning of each option.
Table A-1. JAXB xjc options
Flag |
Value |
Purpose |
---|---|---|
N/A |
DTD to parse |
Specify the DTD constraint set to JAXB to generate class from. |
N/A |
Binding schema to parse |
Specify the binding schema (if any) to use for generation options. |
|
Destination directory |
Specify the directory to put generated classes in. |
|
List of XML element names |
If a DTD has multiple elements that can be considered the root of a document, this option allows listing of each element. JAXB will use this list for generating classes. |
Get Java & XML Data Binding now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.