[jdom-interest] children as List
arosen at silverstream.com
Fri Sep 1 12:47:29 PDT 2000
> What is the definition of List if not an
> ordered set of items, the items normally being called the children
> of the list? Element contains children in a particular order. Things
> that have ordered children are lists. Therefore Element is a list.
The things in a List are not usually called its children, but its elements or contents.
(Talk about overloaded words - maybe "items" is better here.) So the system you propose
would mean that you'd ask for an Element's second item, not its second child, which
A List *contains* things. You *could* say that an Element contains other Elements, but
it's much more natural to say that the Elements are children of the parent Element.
When I think of a List, I think of a long, rectangular box with other boxes inside;
when I think of Elements, I think of a box with other boxes drawn below it, as
To me, the more relevent problem is that you'd get rid of the word "child" from the
In the last case, what you're getting from the element is not obvious. As someone
pointed out, since an Element is a container for Attributes too, this seems like a
deal-breaker for me. The first two choices are much clearer.
More information about the jdom-interest