I've been reading up on JAXB, and it definitely looks more appealing than JDOM. My only concern is that Sun says the "next update will not be API-level compatible with the current early access release". Does it pay for me to invest time getting familar with it now, or should I wait until after the next release (Q4 2002). How much change of an API change is expected? Mark Stein SCJP2
i have'nt worked with JAXB / JDOM but i understand what they are. W'dnt we be using JAXB only when we want a java representation of an XML document that adheres to a DTD? So JAXB is applicable only in cases of valid and wellformed XML documents? My question: Are JDOM and JAXB interchangeable? JDOM i guess is a generic representation (tree or any datastructure) of any XML file whereas JAXB results in a custom java object. As long as i know how the input XML file is going to look like , i can probably use JAXB. Can i safely conclude that.. 1. If I'm expecting an xml document which is associated with a schema / DTD 2. and I need to process the whole document I w'd go for JAXB and not for DOM/ JDOM?
Originally posted by Mark Stein: I've been reading up on JAXB, and it definitely looks more appealing than JDOM.
XML is 'structured data'. So if you want to manipulate the DATA and the STRUCTURE use DOM, JDOM or XSLT. If you just want to change the DATA but NOT the STRUCTURE than consider to use XML Data Binding: JAXB from Sun, - it creates the Java Data Objects out of DTDs - or the much major Castor XML - it create the Java Data Objects out of XML Schema (http://castor.exolab.org/xml-framework.html). Using Data Binding its worth considering that changes to the STRUCTURE requires a rebinding, that means you need to update the Java Data Objects. Anyways, manipulation the DATA is much easier with Data Binding than with DOM or JDOM. Regards Berny
I agree to what has been said so far. JAXB is not a replacement for JDOM. They serve totally different purposes and hence are not mutually exclusive. There has been a lot of things going on in the databinding arena. JAXB is now a part of the acclaimed JAXPack in JDK1.4. There are other implemementations out there for XML to JavaBean and vice-versa conversion. IMO since the standards are still evolving, I donot feel comfortable in using JAXB in anything critical. Remember DTD and Schema spec itself have undergone significant changes since they were born and all databinding implementations must adopt to the latest spec. Until the standards mature, I may not consider using JAXB. Just my opinion..
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com