[jdom-interest] Re: Comments on JDOM b10-rc1

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Feb 11 20:15:28 PST 2004


At 5:50 PM -0800 2/11/04, Jason Hunter wrote:

>detach() and getParent() don't make much sense either.  Put another 
>way, the only method from Content that might make any sense is 
>getValue(), and there not much.


They don't make a lot of sense in and of themselves, but they're not 
wrong. getParent returns null, and detach is a no-op.

The real reason to make Document a Node is so that we can write 
methods that process nodes without worrying excessively about what 
kind of Node it is. having to special cases the code for Document 
makes life a lot uglier.
-- 

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA



More information about the jdom-interest mailing list