W3C home > Mailing lists > Public > www-dom@w3.org > January to March 1999

Yet Another NodeList Question

From: Harold Poskanzer <hmp@infoseek.com>
Date: Fri, 19 Mar 1999 12:36:19 -0800
Message-Id: <199903192036.MAA04790@sprung.infoseek.com>
To: www-dom@w3.org
I've just spent a few hours reviewing this list's archive and managed to 
answer almost all of my questions about NodeLists.  Damn they're weird.  ;)  
There was one question to which I couldn't find an answer, though:

Since a NodeList is a "live view" into the tree, what does nextSibling do on 
items in a NodeList?  It would seem like it should return the next sibling in 
the tree, not the next sibling in the NodeList.  However, that makes stepping 
through items in an "abstract" NodeList (like that generated from 
getElementsByTagName) a little difficult.  I haven't looked at DOM2 yet, but I 
imagine that this problem is solved by iterators.

But what's the answer in Level 1?

Thanks much,
-H

=====================================================================
Harold Poskanzer                             Senior Software Engineer
Infoseek Corporation                                 hmp@infoseek.com
1399 Moffet Park Drive                            Phone: 408-543-6741
Sunnyvale, CA  94089                         http://www.infoseek.com/
---------------------------------------------------------------------
                 Infoseek.  Once you know, you know.
Received on Friday, 19 March 1999 15:36:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT