The NodeList returned by getChildNodes is actually the node itself which
has a cache so that walking down the list linearly, by calling item(i),
costs little more than getNextSibling. The liveness aspect of it in this
case doesn't really add much burden.
However, the NodeList returned by getElementsByTagName also uses a
cache, which will be invalidated whenever you modify something in the
tree.

So depending on what you're doing you may loose a lot in performance by
using NodeList. But, again there is no general answer.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

Reply via email to