For Programmers: Free Programming Magazines  


Home > Archive > Java Help > December 2004 > XML: JDOM vs DOM









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author XML: JDOM vs DOM
Timothy Murphy

2004-12-22, 9:14 pm

I'm just reading "Java & XML" by Brett McLoughlin,
and he introduces JDOM, which he created (with others).
I'm wondering how widely JDOM is used,
and if people do find it simpler than DOM?

I've actually found a few problems compiling the JDOM code
in the book, as there seem to have been some changes in the API
since it was written.

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
nimph

2004-12-22, 9:14 pm

"Although it's similar to the World Wide Web Consortium's (W3C) DOM,
it's an alternative document object model that was not built on DOM or
modeled after DOM. The main difference is that while DOM was created to
be language-neutral and initially used for JavaScript manipulation of
HTML pages, JDOM was created to be Java-specific and thereby take
advantage of Java's features, including method overloading,
collections, reflection, and familiar programming idioms. For Java
programmers, JDOM tends to feel more natural and "right." It's similar
to how the Java-optimized RMI (remote method invocation) library feels
more natural than the language-neutral CORBA (Common Object Request
Broker Architecture)." -
http://www.oracle.com/technology/or...ep/o52jdom.html


I too have the same book you have, and yes, the API has changed a
little. I find it much simpler to use since it has a lot of stuff
required in parsing XML built in, rather than you having to write the
code yourself!

$0.02
Adam

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com