JAXB

Last but not least, I want to cover JAXB, Sun’s Java Architecture for Data Binding. It might surprise you that I’m dealing with JAXB last, or that I’ve even included coverage of other APIs. However, Sun’s offering has been very slow in coming, and is still in early access as I write this book. It will probably not be in a final form when you are reading this chapter, and it has a very limited feature set. Certainly, future versions will add functionality, but for now Sun is just trying to get a stable offering out to the public. You will find features in Castor and Zeus that simply aren’t available in JAXB right now; for all these reasons, I want to let you see more than just the JAXB framework. And of course, I’m generally of the opinion that open source software is just cool!

Installation

To get started, you need to download JAXB from Sun at http://java.sun.com/xml/jaxb/index.html. I also recommend you get the documentation and specification.

Warning

At the time of this writing, JAXB is in early release. Sun could easily change things before a final version, although that’s not really common in EA (early access) software. Still, be warned that you may have to tweak the code shown here to work by the time you are checking JAXB out. Additionally, there are many errors in the documentation (at least in the early release). I’ve tried to steer clear of those here, so the examples in this section can be used as correct syntax if you run into errors using the JAXB instructions (as ...

Get Java and XML, Second Edition 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.