org.custommonkey.xmlunit

## Class ElementNameQualifier

- java.lang.Object
- - org.custommonkey.xmlunit.ElementNameQualifier

All Implemented Interfaces:
  ElementQualifier

Direct Known Subclasses:
  ElementNameAndAttributeQualifier, ElementNameAndTextQualifier

    public class ElementNameQualifier
    extends java.lang.Object
    implements ElementQualifier

Simple interface implementation that tests two elements for name comparability. This class provides the default behaviour within a DifferenceEngine (for backwards compatibility)
Examples and more at xmlunit.sourceforge.net

See Also:
  `DifferenceEngine.compareNodeList(NodeList, NodeList, int, DifferenceListener, ElementQualifier)`, `Diff.overrideElementQualifier(ElementQualifier)`

### Constructor Summary

Constructors
Constructor and Description
`ElementNameQualifier()`

### Method Summary

Methods
`protected boolean` `equalsNamespace(org.w3c.dom.Node control, org.w3c.dom.Node test)` Determine whether two nodes are defined by the same namespace URI
`protected java.lang.String` `getNonNamespacedNodeName(org.w3c.dom.Node node)` Strip any namespace information off a node name
`boolean` `qualifyForComparison(org.w3c.dom.Element control, org.w3c.dom.Element test)` Determine whether two elements qualify for further Difference comparison.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ElementNameQualifier

    public ElementNameQualifier()

### Method Detail

#### qualifyForComparison

    public boolean qualifyForComparison(org.w3c.dom.Element control,
                               org.w3c.dom.Element test)

Determine whether two elements qualify for further Difference comparison.

Specified by:
  `qualifyForComparison` in interface `ElementQualifier`
Parameters:
  `control` -
  `test` -
Returns:
  true if the two elements qualify for further comparison based on their similar namespace URI and non-namespaced tag name, false otherwise

#### equalsNamespace

    protected boolean equalsNamespace(org.w3c.dom.Node control,
                          org.w3c.dom.Node test)

Determine whether two nodes are defined by the same namespace URI

Parameters:
  `control` -
  `test` -
Returns:
  true if the two nodes are both defined by the same namespace URI (including the default - empty - namespace), false otherwise

#### getNonNamespacedNodeName

    protected java.lang.String getNonNamespacedNodeName(org.w3c.dom.Node node)

Strip any namespace information off a node name

Parameters:
  `node` -
Returns:
  the localName if the node is namespaced, or the name otherwise