org.htmlparser.filters
Class LinkStringFilter
- Cloneable, NodeFilter, Serializable
public class LinkStringFilter
This class accepts tags of class LinkTag that contain a link matching a given
pattern string. Use this filter to extract LinkTag nodes with URLs containing
the desired string.
protected boolean | mCaseSensitive - Flag indicating case sensitive/insensitive search.
|
protected String | mPattern - The pattern to search for in the link.
|
LinkStringFilter(String pattern) - Creates a LinkStringFilter that accepts LinkTag nodes containing
a URL that matches the supplied pattern.
|
LinkStringFilter(String pattern, boolean caseSensitive) - Creates a LinkStringFilter that accepts LinkTag nodes containing
a URL that matches the supplied pattern.
|
boolean | accept(Node node) - Accept nodes that are a LinkTag and
have a URL that matches the pattern supplied in the constructor.
|
mCaseSensitive
protected boolean mCaseSensitive
Flag indicating case sensitive/insensitive search.
mPattern
protected String mPattern
The pattern to search for in the link.
LinkStringFilter
public LinkStringFilter(String pattern)
Creates a LinkStringFilter that accepts LinkTag nodes containing
a URL that matches the supplied pattern.
The match is case insensitive.
pattern
- The pattern to match.
LinkStringFilter
public LinkStringFilter(String pattern,
boolean caseSensitive)
Creates a LinkStringFilter that accepts LinkTag nodes containing
a URL that matches the supplied pattern.
pattern
- The pattern to match.caseSensitive
- Specifies case sensitivity for the matching process.
accept
public boolean accept(Node node)
Accept nodes that are a LinkTag and
have a URL that matches the pattern supplied in the constructor.
- accept in interface NodeFilter
node
- The node to check.
true
if the node is a link with the pattern.
| © 2005 Derrick Oswald Mai 08, 2008 |
HTML Parser is an open source library released under LGPL. |  |