[Htmlparser-user] how to get a node struture with particular attribute
Brought to you by:
derrickoswald
From: answers s. <fas...@gm...> - 2008-05-23 09:00:02
|
hi i am filter like this NodeFilter filterClass = new AndFilter(new TagNameFilter("font"),new HasAttributeFilter("class","leftnavi")); I am using this filter aginst this Text <FONT class=leftnavi size=2> <a href="http://epaper.thehindu.com">ePaper</a><br<http://epaper.thehindu.com">epaper</a><br> > <A href="01hdline.htm">Front Page</A><BR> <A href="02hdline.htm">National</A><BR> <font class=leftnavi color=black>States:</font><br> • <A href="23hdline.htm">Tamil Nadu</A><BR> • <A href="21hdline.htm">Andhra Pradesh</A><BR> • <A href="22hdline.htm">Karnataka</A><BR> • <A href="25hdline.htm">Kerala</A><BR> • <A href="24hdline.htm">New Delhi</A><BR> • <A href="14hdline.htm">Other States</A><BR> <A href="03hdline.htm">International</A><BR> <A href="05hdline.htm">Opinion</A><BR> <A href="06hdline.htm">Business</A><BR> <A href="07hdline.htm">Sport</A><BR> <A href="10hdline.htm">Miscellaneous</A><BR> • <A href="10hdline.htm#019">Cartoons</A><BR> <A href="26hdline.htm">Engagements</A><BR> </FONT> but the i am getting is <FONT class=leftnavi size=2> but i want o/p as whole font tag as <FONT class=leftnavi size=2> <a href="http://epaper.thehindu.com">ePaper</a><br<http://epaper.thehindu.com">epaper</a><br> > <A href="01hdline.htm">Front Page</A><BR> <A href="02hdline.htm">National</A><BR> <font class=leftnavi color=black>States:</font><br> • <A href="23hdline.htm">Tamil Nadu</A><BR> • <A href="21hdline.htm">Andhra Pradesh</A><BR> • <A href="22hdline.htm">Karnataka</A><BR> • <A href="25hdline.htm">Kerala</A><BR> • <A href="24hdline.htm">New Delhi</A><BR> • <A href="14hdline.htm">Other States</A><BR> <A href="03hdline.htm">International</A><BR> <A href="05hdline.htm">Opinion</A><BR> <A href="06hdline.htm">Business</A><BR> <A href="07hdline.htm">Sport</A><BR> <A href="10hdline.htm">Miscellaneous</A><BR> • <A href="10hdline.htm#019">Cartoons</A><BR> <A href="26hdline.htm">Engagements</A><BR> </FONT> |