DOM Traversal: NodeIterator or TreeWalker?
- From: Patient Guy <sevisen.adam@gmailDOTHEREcom>
- Date: Tue, 11 Jul 2006 14:27:20 GMT
I posted this question in a moribund group but now post it here:
I have an HTML document with a TABLE element and I want to count the number
of rows, presumably counting TR elements taking into account 'rowspan'
attributes; and the number of columns, presumably counting TH and TD
elements taking into 'colspan' attributes.
I have my own old code (probably bug-ridden) and would rather use the
Traversal DOM.
What is the best to use, a NodeInterator or TreeWalker? The use of the
NodeFilter is a bit confusing. If you have any advice I should consider
when I write this code, thanks.
I want this to work with MSIE too, and I usually write those DOM functions
as best as possible when MSIE has not implemented it. Has MS implemented
it?
.
- Follow-Ups:
- Re: DOM Traversal: NodeIterator or TreeWalker?
- From: Martin Honnen
- Re: DOM Traversal: NodeIterator or TreeWalker?
- Prev by Date: Ajax sometimes stops at readystate 1
- Next by Date: Re: Updating from a list without reloading the page
- Previous by thread: Ajax sometimes stops at readystate 1
- Next by thread: Re: DOM Traversal: NodeIterator or TreeWalker?
- Index(es):