public final class NamedNodeFilter extends Object implements org.w3c.dom.traversal.NodeFilter
NodeIterator
#SHOW_ELEMENT.
It can also be used to retrieve processing instructions with a specific target
name or entity references, by selecting a different whatToShow value.
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)
and should
be used for named filters that are routinely reused.
NodeFilter
,
NodeIterator
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 nodeName)
Returns a node filter for the specified node name.
|
public short acceptNode(Node node)
acceptNode
in interface org.w3c.dom.traversal.NodeFilter
public static org.w3c.dom.traversal.NodeFilter lookup(String nodeName)
nodeName
- The name to filter byPhantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.