private static class NodeTest.NodeTypeNodeFilter
extends java.lang.Object
implements org.w3c.dom.traversal.NodeFilter
Modifier and Type | Field and Description |
---|---|
private short[] |
nodeTypes |
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
Constructor and Description |
---|
NodeTypeNodeFilter(short[] nodeTypes)
Construct filter for specific node types
|
Modifier and Type | Method and Description |
---|---|
short |
acceptNode(org.w3c.dom.Node aNode)
NodeFilter method.
|
private boolean |
acceptNodeType(short shortVal)
Does this instance accept nodes with the node type value
|
public NodeTypeNodeFilter(short[] nodeTypes)
nodeTypes
- note Node.ATTRIBUTE_NODE
is not
exposed by the DocumentTraversal node iterator unless the root node
is itself an attribute - so a NodeTester that needs to test attributes
should obtain those attributes from Node.ELEMENT_NODE
nodespublic short acceptNode(org.w3c.dom.Node aNode)
acceptNode
in interface org.w3c.dom.traversal.NodeFilter
aNode
- private boolean acceptNodeType(short shortVal)
shortVal
-