[jdom-interest] Last call: getChild/getChildren versus getChildElement/getChildElements
Bradley S. Huffman
hip at cs.okstate.edu
Fri Feb 6 10:52:35 PST 2004
Elliotte Rusty Harold writes:
> We've been around this circle before. We could (and should) have
> fixed it years ago. But we keep pussy-footing around, worrying about
> it the very temporary pain that will be caused if we change it. It's
> still broken. It still needs to be fixed. Fix it now, once and for
> all, and forget about it. Rip the band-aid off in one fell swoop. It
> will hurt a lot less to do that now than to spend the next ten years
> living with the ugly sore of this inconsistency.
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.
More information about the jdom-interest