RE: NodeList (was RE: NamedNodeMap)

>  I don't think the liveness requirement is described very carefully;

It's defined very carefully, though tersely. A somewhat more readable
description is available at http://www.w3.org/DOM/faq.html#nodelist

>if I have a node that I remove from the tree, and then add to another
>location, should the node be included in any NodeList objects returned
>from getElementsByTagName()?

The NodeList should always look as it would if you had just requested it.
When you remove the node, it drops out of the NodeList. When you insert it,
it will be inserted into the NodeList IF the insertiion point is within the
subtree of the node on which getElementsByTagName() was issued.  Note that
the location where it's inserted may be different from where it was
removed, since the NodeList displays the nodes in document order.




______________________________________
Joe Kesselman  / IBM Research

Received on Wednesday, 11 July 2001 16:58:26 UTC