I still haven't seen realworld evidence that JDOM actually adds much convenience.
I've taught DOM and JDOM both numerous times. It's become obvious to me that most developers take a long time to understand DOM if they ever do. JDOM works for them out of the box. Some of the most important features:
1. A sensible namespace policy that doesn't allow attributes to get out of sync with the namespaces
2. Nodes that can be moved between documents, and detached from documents completely.
3. No non-namespace aware methods.
4. No confusion of the physical and logical model of the XML document
5. Disjoint types. In JDOM there's no chance that your element is also an instance of Attribute or a comment is also a ProcessingInstruction.
Without even touching any of the myriad problems caused by DOM being a cross-language API, or looking at convenience methods, parsing, and serialization, I think these are pretty fundamental differences that make JDOM a lot easier to use and learn than DOM is ever going to be.
--
Elliotte Rusty Harold [EMAIL PROTECTED] Effective XML (Addison-Wesley, 2003) http://www.cafeconleche.org/books/effectivexml http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
