- From: Ian Hickson <ian@hixie.ch>
- Date: Thu, 31 Jan 2008 07:11:38 +0000 (UTC)
On Wed, 30 Jan 2008, Garrett Smith wrote: > > > > One of the following drafts probably already handles your needs: > > > > http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#TreeWalker > > http://www.w3.org/TR/ElementTraversal/ > > To create a tree walker, define an accept() and then iterate through > nodes, would be more effort than rewriting the hand-rolled > Dom.getNextSibling function I posted every time. I guess I could replace > the source code of my dom.getNextSiblingElement, but a for() loop is > probably simpler. > > REally, all I want is > nextSiblingElement/previousSiblingElement/childElements properties so I > don't have to have library code or write a for() loop every time i want > to just find the next sibling element. Well then the second link I posted above is probably what you want. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 30 January 2008 23:11:38 UTC