[jdom-interest] children as List

Patrick Dowler Patrick.Dowler at nrc.ca
Fri Sep 1 14:17:28 PDT 2000

On Fri, 01 Sep 2000, you wrote:
> > 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.
> > QED.
> 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
> feels wrong.
> 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
> children.

On the contrary, in simple XML like


it is clear that element "foo" contains element "bar". 


Patrick Dowler
Canadian Astronomy Data Centre

More information about the jdom-interest mailing list