FileDocCategorySizeDatePackage
NameNodeFilter.javaAPI DocApache Xerces 3.0.12744Fri Sep 14 20:33:58 BST 2007dom.traversal

NameNodeFilter

public class NameNodeFilter extends Object implements 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 Summary
String
fName
boolean
fMatch
Constructors Summary
Methods Summary
public shortacceptNode(org.w3c.dom.Node n)
acceptNode determines if this filter accepts a node name or not.


            if (fName == null || fMatch && n.getNodeName().equals(fName) 
            ||  !fMatch && !n.getNodeName().equals(fName))
                return FILTER_ACCEPT;
            else 
                return FILTER_REJECT;
        
public booleangetMatch()
Return match value.

            return this.fMatch;
        
public java.lang.StringgetName()
Return the name to compare with node name. If null, all node names are successfully matched.

            return this.fName;
        
public voidsetMatch(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.

            this.fMatch = match;
        
public voidsetName(java.lang.String name)
The name to compare with the node name. If null, all node names are successfully matched.

            
                                     
            
            this.fName = name;