W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 1999

Traversing tree nodes

From: New 2Java <new2java@hotmail.com>
Date: Wed, 06 Oct 1999 16:00:21 GMT
Message-ID: <19991006160021.86707.qmail@hotmail.com>
To: html-tidy@w3.org
I am having difficulty traversing the tree tidy.parse() generates. I want to 
skip contents of some elements. I have used
"content" and "next" variables of the Node object to traverse the tree. But 
they haven't been very useful when skipping contents. Here is an example:
<tr><td>table 1 - header info.
<tr><td>table 1 - footer info.
this table</tbody></table>
<tr><td>Skip embedded table to this row.

What would be the correct algorithm to traverse this tree to arrive at "skip 
embedded table to this row" row, regardless of the level of embedded tables? 

Get Your Private, Free Email at http://www.hotmail.com
Received on Wednesday, 6 October 1999 12:00:53 UTC

This archive was generated by hypermail 2.3.1 : Friday, 13 July 2018 08:58:57 UTC