HTML Parser Home Page

Interface NodeFilter

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
AndFilter, AndFilterWrapper, CssSelectorNodeFilter, Filter, HasAttributeFilter, HasAttributeFilterWrapper, HasChildFilter, HasChildFilterWrapper, HasParentFilter, HasParentFilterWrapper, HasSiblingFilter, HasSiblingFilterWrapper, IsEqualFilter, LinkRegexFilter, LinkStringFilter, NodeClassFilter, NodeClassFilterWrapper, NotFilter, NotFilterWrapper, OrFilter, OrFilterWrapper, RegexFilter, RegexFilterWrapper, StringFilter, StringFilterWrapper, TagNameFilter, TagNameFilterWrapper, XorFilter

public interface NodeFilter
extends Serializable, Cloneable

Implement this interface to select particular nodes.

Method Summary
 boolean accept(Node node)
          Predicate to determine whether or not to keep the given node.

Method Detail


boolean accept(Node node)
Predicate to determine whether or not to keep the given node. The behaviour based on this outcome is determined by the context in which it is called. It may lead to the node being added to a list or printed out. See the calling routine for details.

node - The node to test.
true if the node is to be kept, false if it is to be discarded.

© 2005 Derrick Oswald
Jun 10, 2006

HTML Parser is an open source library released under LGPL.