Package org.htmlparser.filters
Class CssSelectorNodeFilter
java.lang.Object
org.htmlparser.filters.CssSelectorNodeFilter
- All Implemented Interfaces:
Serializable
,Cloneable
,NodeFilter
A NodeFilter that accepts nodes based on whether they match a CSS2 selector.
Refer to
http://www.w3.org/TR/REC-CSS2/selector.html for syntax.
Todo: more thorough testing, any relevant pseudo-classes, css3 features
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCssSelectorNodeFilter
(String selector) Create a Cascading Style Sheet node filter. -
Method Summary
-
Constructor Details
-
CssSelectorNodeFilter
Create a Cascading Style Sheet node filter.- Parameters:
selector
- The selector expression.
-
-
Method Details
-
accept
Accept nodes that match the selector expression.- Specified by:
accept
in interfaceNodeFilter
- Parameters:
node
- The node to check.- Returns:
true
if the node matches,false
otherwise.
-
unescape
Replace escape sequences in a string.- Parameters:
escaped
- The string to examine.- Returns:
- The argument with escape sequences replaced by their equivalent character.
-