aspose file tools*
The moose likes XML and Related Technologies and the fly likes Is JDOM superior to JAXP ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Is JDOM superior to JAXP ?" Watch "Is JDOM superior to JAXP ?" New topic
Author

Is JDOM superior to JAXP ?

Doshi Milan
Ranch Hand

Joined: May 29, 2001
Posts: 112
Hello friends ,
I have been doing some coding in JAXP and there are some people of the opinion that JDOM is better and I should use the JDOM API.
Now I have no idea at all of JDOM whatsoever but I personally do feel that JAXP does make heavy weather of simple things like getNodeValue()of the Interface Node, for example. Anyway as I have no idea of JDOM at all, I would like to have expert advice as to which is better and when ?
Thanks and regards,
Milan Doshi
[ June 21, 2002: Message edited by: Doshi Milan ]
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Let me start by saying JDOM and JAXP has nothing in common. So you shouldn't be comparing them in the first place.
JAXP allows you to seamlessly plugin any (JAXP-compliant) parser into your application. It is important to remember JAXP is not a parser by itself, but provides a layer of abstraction to an underlying parser.
JDOM is a Java representation of an XML document. It is a document object model that uses XML parsers to build documents. Just like JAXP, JDOM is not an XML parser. The default XML parser used by JDOM is the JAXP-selected parser, but JDOM can use nearly any parser.
JDOM allows you to manipulate a document object model as using Java 2 Collections API. It behaves like a W3C DOM, but is faster and lighter compared to standard DOM. Note that JDOM is not a wrapper around W3C DOM, it stands on its own, completely new ground.
JDOM is fairly new and is most likely to be adopted into JDK. I suggest that you checkout the JDOM Faq and other resources on www.jdom.org

Hope that helps!


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is JDOM superior to JAXP ?