FilterBean Bug (in case multiple filter)
Brought to you by:
derrickoswald
Hi~
in case multiple filter, FilterBean doesn't work
because next part in org.htmlparser.beans.FilterBean
-----------[FilterBean.java]------------
.....
....
protected NodeList applyFilters ()
throws
ParserException
{
NodeFilter[] filters;
NodeList ret;
ret = mParser.parse (null);
filters = getFilters ();
if (null != filters)
for (int i = 0; i < filters.length; i++)
ret = ret.extractAllNodesThatMatch (filters[i], mRecursive);
return (ret);
}
----------------------------------------
in my case :
FilterBean fb = new FilterBean();
fb.setFilters(new NodeFilter[] {titlefilter, filter});
fb.setURL(urlStr);
NodeList list = fb.getNodes();
Result : list.size() it's always zero
Logged In: YES
user_id=605407
Originator: NO
Can you be more specific.
The filters are applied in series - they are ANDed - so that a node must pass through all filters.
So in your case it must be a title and also be OK according to filter.
Logged In: YES
user_id=1773055
Originator: YES
sorry!! it's my mistake.
i think they are OR operation.
thank you for fast response