[Htmlparser-developer] Is anyone can give me some help for using the Nodelist to delete the comment
Brought to you by:
derrickoswald
|
From: dualspacekimo <dua...@ya...> - 2005-04-21 16:37:09
|
I am confused with that....Nodelist's method
Especially the NotFilter ...
If I want to filter the RemarkNode.
Is it possible that use the following code to achive
the goal? I have write the code...but not skip the
comment in the html.
NodeList nodelist =
parser.extractAllNodesThatMatch(new HasAttributeFilter
("class","blogbody"));
nodelist.keepAllNodesThatMatch( new NotFilter(new
NodeClassFilter (RemarkNode.class));
SimpleNodeIterator Noderator = nodelist.elements();
while(Noderator.hasMoreNodes()){
......//print the content
}//end while
_______________________________________________________________________
Yahoo!奇摩電子信箱
免費容量250MB,信件在多也不怕
http://tw.promo.yahoo.com/mail_new/index.html
|