Summary

This chapter discussed the Java API for XML Binding (JAXB). If the DTD for an XML document type is known, that information can offer a much more intuitive interface to the XML document than that provided by the JAXP. The JAXB provides a compile time tool that generates Java class objects from a DTD and a binding schema that defines how the classes are to be built. At its simplest level, the binding schema need only define the root node of the XML document, but the binding schema is much more powerful. The binding schema can change variables from their default String type to any primitive, non-primitive, or enumerated type. Finally, the classes the JAXB generates can be extended to add application-specific functionality.

With JAXB under ...

Get Java™ Web Services Unleashed 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.