[jdom-interest] getChildren() vs getElements()

Peter V. Gadjokov pvg at c-c-s.com
Wed Sep 20 18:35:21 PDT 2000


"Achilles' baneful wrath resound, O Goddess, that imposed
infinite sorrows on the Greeks, and many brave soul loosed
from breasts heroic; sent them far to that invisible cave
that no light comforts; and their limbs to dogs and vultures gave:
to all which Jove's will gave effect; from whom first strife begun
betwixt Atrides, king of men, and Thetis' godlike son."

It's hard to tell what the score is. Recently, on All Of My Elements, we've
discussed a number of approaches. 


Wu-tang style:

Keep things as they are, getChild stays as it is. It's short and it's sweet
and we know it complete. Major proponent, I think, is Jason "Uncarved Block"
Hunter, who believes this API speeds his journey down the eightfold path and
helps him write books. Major opponent is Brett who wants to burn such
spec-less heresy in effigy and dance by the flame.  


I got your element right here, pal:

Change getChild and co to getElement/getElements, potentially make the
'child' methods for adding and removing stuff add and remove things that the
spec actually calls children (element, pi, cdata, and the like, but not
attributes). Major proponent is Alex "There's no other Element but Zuul"
Chaffee, Jason has expressed misgivings about the havoc this wreaks upon his
beloved getChildTextTrim.


Sweet childElement of mine:

This one would change getChild to getChildElement and so on. Part of the
motivation is spec-compliance (and clarity-through-verbosity) but it's not
quite certain if this approach would also mean replacing the content methods
with methods that talk about children. Major proponent is Brett
"Spec-Thumpin'" McLaughlin.


Peter "V. is for Verbal" Gadjokov

-pvg

P.S. All misrepresentations above are in jest, in error or both.




More information about the jdom-interest mailing list