W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2003

can I do this?

From: Neil <parkflys@yahoo.com>
Date: Tue, 24 Jun 2003 12:46:46 -0700 (PDT)
Message-ID: <20030624194646.28065.qmail@web10406.mail.yahoo.com>
To: html-tidy@w3.org

hi, so far I've been able to use jtidy alright, but
I'm kinda stuck.  What I want to do is read a static
html file from disk, then go through a table and
remove some <tr></tr> elements depending on
<td>text</td> inside. so... say there was a <td> in a
<tr> and in the <td> was the text "foo", I would want
to remove that whole <tr>.

if (td.getText().equals("foo")) {
 parent.removeChild(tr);
}

this is just an example, so syntax is made up. but ya.
the problem is, I dont know how to get the text
between 2 tags.  And lastly, I want to write the
modified document back to disk.  How can I do that? 
Thank you so much!!!!


Neil

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
Received on Tuesday, 24 June 2003 15:47:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:54 GMT