[jdom-interest] Last call: getChild/getChildren versus getChildElement/getChildElements

Elliotte Rusty Harold elharo at metalab.unc.edu
Fri Feb 6 11:50:17 PST 2004


At 12:52 PM -0600 2/6/04, Bradley S. Huffman wrote:
>In hindsight, and this applies to XOM too, it probably would of been
>better to leave out all specialized filtering methods (like the 
>getChildElement/s
>methods), have only 1 method for getting *all* child content, or hell
>just getContent(int) and getContentSize), and just use XPath for everthing
>else. Either way doesn't bother me cause I can use sed on all my stuff.
>But if we're going to change from getChildren->getChildElements, maybe
>consideration should be given to just deprecating it completely.

No, I have no objection to the behavior of the method. I think it's 
completely appropriate to have a method that returns all the child 
elements, or all the child elements with a certain name. There are 
very practical and frequent use cases for this. I just want the name 
to match the behavior.
-- 

   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