public final class ElementFilter extends Object implements org.w3c.dom.traversal.NodeFilter
If a namespace URI is provided, the namespace and local name are compared. If the namespace URI is "*", all namespaces are matched and only the local name is compared. If the namespace is not provided, standard lookup occurs.
A node filter can be shared by multiple iterators. When a filters
is reused, it is better to retrieve a copy of the filter from
a static list. This mechanism is supported by calling the static
method lookup(java.lang.String, java.lang.String, boolean)
and should be used for named filters that
are routinely reused.
NodeFilter
,
NodeIterator
Modifier and Type | Field and Description |
---|---|
static String |
MATCH_ALL
This pattern can be used for the local name to indicate that all
elements should be returned or in the namespace URI to indicate
that all namespace URIs must be matched.
|
FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP, SHOW_ALL, SHOW_ATTRIBUTE, SHOW_CDATA_SECTION, SHOW_COMMENT, SHOW_DOCUMENT, SHOW_DOCUMENT_FRAGMENT, SHOW_DOCUMENT_TYPE, SHOW_ELEMENT, SHOW_ENTITY, SHOW_ENTITY_REFERENCE, SHOW_NOTATION, SHOW_PROCESSING_INSTRUCTION, SHOW_TEXT
Modifier and Type | Method and Description |
---|---|
short |
acceptNode(Node node) |
static org.w3c.dom.traversal.NodeFilter |
lookup(String namespaceURI,
String localName,
boolean ignoreCase)
Returns an element filter for the specified tag name.
|
public static final String MATCH_ALL
public short acceptNode(Node node)
acceptNode
in interface org.w3c.dom.traversal.NodeFilter
public static org.w3c.dom.traversal.NodeFilter lookup(String namespaceURI, String localName, boolean ignoreCase)
ignoreCase
- True if case should be ignored (for HTML)Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.