public boolean isEqualNode()

in mixins/dom-mixins/src/main/java/org/apache/axiom/dom/impl/mixin/DOMNodeMixin.java [150:177]


    public boolean isEqualNode(Node other) {
        if (getNodeType() != other.getNodeType()
                || !Objects.equals(getNodeName(), other.getNodeName())
                || !Objects.equals(getLocalName(), other.getLocalName())
                || !Objects.equals(getNamespaceURI(), other.getNamespaceURI())
                || !Objects.equals(getPrefix(), other.getPrefix())
                || !Objects.equals(getNodeValue(), other.getNodeValue())) {
            return false;
        }
        NamedNodeMap attributes = getAttributes();
        NamedNodeMap otherAttributes = other.getAttributes();
        if (attributes == null ^ otherAttributes == null) {
            return false;
        }
        if (attributes != null) {
            if (attributes.getLength() != otherAttributes.getLength()) {
                return false;
            }
            for (int a = 0, itemCount = attributes.getLength(); a < itemCount; a++) {
                Node attribute = attributes.item(a);
                Node otherAttribute = otherAttributes.getNamedItem(attribute.getNodeName());
                if (otherAttribute == null || !attribute.isEqualNode(otherAttribute)) {
                    return false;
                }
            }
        }
        return true;
    }