1 . 逻辑关系:与或非
() Creates a new instance of an AndFilter. |
([] predicates) Creates an AndFilter that accepts nodes acceptable to all given filters. |
( left, right) Creates an AndFilter that accepts nodes acceptable to both filters. |
() Creates a new instance of an OrFilter. |
([] predicates) Creates an OrFilter that accepts nodes acceptable to any of the given filters. |
( left, right) Creates an OrFilter that accepts nodes acceptable to either filter. |
() Creates a new instance of an OrFilter. |
([] predicates) Creates an OrFilter that accepts nodes acceptable to any of the given filters. |
( left, right) Creates an OrFilter that accepts nodes acceptable to either filter. |
2. 内容
StringFilter:功能简单有限;复杂功能可使用RegexFilter (正则表达式)
() Creates a new instance of StringFilter that accepts all string nodes. |
( pattern) Creates a StringFilter that accepts text nodes containing a string. |
( pattern, boolean sensitive) Creates a StringFilter that accepts text nodes containing a string. |
( pattern, boolean sensitive, locale) Creates a StringFilter that accepts text nodes containing a string. |
() Creates a new instance of RegexFilter that accepts string nodes matching the regular expression ".*" using the FIND strategy. |
( pattern) Creates a new instance of RegexFilter that accepts string nodes matching a regular expression using the FIND strategy. |
( pattern, int strategy) Creates a new instance of RegexFilter that accepts string nodes matching a regular expression. |
3 标签
TagNameFilter()利用标签名过滤 : div ,img , ...
NodeClassFilter()利用标签类别 :LinkTag.class ...
HasAttributeFilter()利用属性 :(, )
LinkRegexFilter()用正则表达式匹配链接
() Creates a new instance of TagNameFilter. |
( name) Creates a TagNameFilter that accepts tags with the given name. |
() Creates a NodeClassFilter that accepts Html tags. |
( cls) Creates a NodeClassFilter that accepts tags of the given class. |
() Creates a new instance of HasAttributeFilter. |
( attribute) Creates a new instance of HasAttributeFilter that accepts tags with the given attribute. |
( attribute, value) Creates a new instance of HasAttributeFilter that accepts tags with the given attribute and value. |
( regexPattern) Creates a LinkRegexFilter that accepts LinkTag nodes containing a URL that matches the supplied regex pattern. |
( regexPattern, boolean caseSensitive) Creates a LinkRegexFilter that accepts LinkTag nodes containing a URL that matches the supplied regex pattern. |
( pattern) Creates a LinkStringFilter that accepts LinkTag nodes containing a URL that matches the supplied pattern. |
( pattern, boolean caseSensitive) Creates a LinkStringFilter that accepts LinkTag nodes containing a URL that matches the supplied pattern. |
4 层次关系
() Creates a new instance of HasParentFilter. |
( filter) Creates a new instance of HasParentFilter that accepts nodes with the direct parent acceptable to the filter. |
( filter, boolean recursive) Creates a new instance of HasParentFilter that accepts nodes with a parent acceptable to the filter. |
() Creates a new instance of a HasChildFilter. |
( filter) Creates a new instance of HasChildFilter that accepts nodes with a direct child acceptable to the filter. |
( filter, boolean recursive) Creates a new instance of HasChildFilter that accepts nodes with a child acceptable to the filter. |
原博出处: