[Htmlparser-user] Does htmlparser Support cellpadding?
Brought to you by:
derrickoswald
From: Henry T. <htr...@ya...> - 2008-06-09 10:40:47
|
Hi forum members, I am having difficulty parsing the content of the table below due to what appears to be the HasAttributeFilter() class which could not recognise the "cellpadding" attribute: <table border="0" cellspacing="0" cellpadding="2" width="100%"> Here are the table data filters that I have tried without much luck: (i) new AndFilter ( new TagNameFilter ("table"), new HasAttributeFilter("cellpadding","2")); (ii) new AndFilter ( new TagNameFilter ("table"), new HasAttributeFilter("cellspacing","0")); (iii) new AndFilter ( new TagNameFilter ("table"), new AndFilter ( new HasAttributeFilter("cellspacing","0"), new HasAttributeFilter("width","100%"))); (iv) new AndFilter ( new TagNameFilter ("table"), new AndFilter ( new HasAttributeFilter("cellspacing","0"), new AndFilter ( new HasAttributeFilter("cellpadding","2"), new HasAttributeFilter("width","100%")))); Table data filters (i) & (iv) did not pick up anything while (ii) and (iii) worked but also include other tables that were not needed. Filter (iv) is perfect if only it would work. As a result, I would like to make the following queries on this issue: (a) Does HasAttributeFilter() support cellpadding? (b) Is there a limit on how many attribute HasAttributeFilter() could pick up in a table? (c) Can HasAttributeFilter() pick up attributes in nested tables? This table is nested inside another table. (d) Does the search for the attributes follow certain order? If so, it may mean that order of the HasAttributeFilter() may need to be alter to achieve the desire search. Many thanks, Henry Get the name you always wanted with the new y7mail email address. www.yahoo7.com.au/mail |