xrel.xml
Class NameNodeFilter

java.lang.Object
  |
  +--xrel.xml.NameNodeFilter
All Implemented Interfaces:
org.w3c.dom.traversal.NodeFilter

public class NameNodeFilter
extends java.lang.Object
implements org.w3c.dom.traversal.NodeFilter

An example filter which enables the client to set a name value accept those node names which match (or explicitly not match) the set name value.


Fields inherited from interface org.w3c.dom.traversal.NodeFilter
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 Summary
NameNodeFilter()
           
 
Method Summary
 short acceptNode(org.w3c.dom.Node n)
          acceptNode determines if this filter accepts a node name or not.
 boolean getMatch()
          Return match value.
 java.lang.String getName()
          Return the name to compare with node name.
 void setMatch(boolean match)
          Controls whether the node name is accepted when it does match the setName value, or when it does not match the setName value.
 void setName(java.lang.String name)
          The name to compare with the node name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameNodeFilter

public NameNodeFilter()
Method Detail

setName

public void setName(java.lang.String name)
The name to compare with the node name. If null, all node names are successfully matched.

getName

public java.lang.String getName()
Return the name to compare with node name. If null, all node names are successfully matched.

setMatch

public void setMatch(boolean match)
Controls whether the node name is accepted when it does match the setName value, or when it does not match the setName value. If the setName value is null this match value does not matter, and all names will match. If match is true, the node name is accepted when it matches. If match is false, the node name is accepted when does not match.

getMatch

public boolean getMatch()
Return match value.

acceptNode

public short acceptNode(org.w3c.dom.Node n)
acceptNode determines if this filter accepts a node name or not.
Specified by:
acceptNode in interface org.w3c.dom.traversal.NodeFilter