public boolean isEqualNode(Node other) {

        // Note that normalization can affect equality; to avoid this,
        // nodes should be normalized before being compared.
        // For the moment, normalization cannot be done.
    	if (other==null) return false;
        if (getNodeType() != other.getNodeType())
            return false;
        if (!getLocalName().equals(other.getLocalName()))
            return false;
        if (notequals(getNamespaceURI(),other.getNamespaceURI()))
            return false;
        if (notequals(getPrefix(), other.getPrefix()))
            return false;
        if (notequals(getNodeValue(),other.getNodeValue()))
            return false;
        if (hasChildNodes() != other.hasChildNodes())
            return false;
        if (hasAttributes() != other.hasAttributes())
            return false;
        if (hasChildNodes()) {
            NamedNodeMap thisAttr = getAttributes();
            NamedNodeMap otherAttr = other.getAttributes();
            if (thisAttr.getLength() != otherAttr.getLength())
                return false;
            for (int i = 0; i < thisAttr.getLength(); i++)
                if (thisAttr.item(i).isEqualNode(otherAttr.item(i)))
                    return false;
        }
        if (hasAttributes()) {
            NodeList thisChild = getChildNodes();
            NodeList otherChild = other.getChildNodes();
            if (thisChild.getLength() != otherChild.getLength())
                return false;
            for (int i = 0; i < thisChild.getLength(); i++)
                if (thisChild.item(i).isEqualNode(otherChild.item(i)))
                    return false;
        }
        return true;
    }
public boolean isEqualNode ( Node other ) { if ( other == null ) return false ; if ( getNodeType ( ) != other . getNodeType ( ) ) return false ; if ( ! getLocalName ( ) . equals ( other . getLocalName ( ) ) ) return false ; if ( notequals ( getNamespaceURI ( ) , other . getNamespaceURI ( ) ) ) return false ; if ( notequals ( getPrefix ( ) , other . getPrefix ( ) ) ) return false ; if ( notequals ( getNodeValue ( ) , other . getNodeValue ( ) ) ) return false ; if ( hasChildNodes ( ) != other . hasChildNodes ( ) ) return false ; if ( hasAttributes ( ) != other . hasAttributes ( ) ) return false ; if ( hasChildNodes ( ) ) { NamedNodeMap thisAttr = getAttributes ( ) ; NamedNodeMap otherAttr = other . getAttributes ( ) ; if ( thisAttr . getLength ( ) != otherAttr . getLength ( ) ) return false ; for ( int i = 0 ; i < thisAttr . getLength ( ) ; i ++ ) if ( thisAttr . item ( i ) . isEqualNode ( otherAttr . item ( i ) ) ) return false ; } if ( hasAttributes ( ) ) { NodeList thisChild = getChildNodes ( ) ; NodeList otherChild = other . getChildNodes ( ) ; if ( thisChild . getLength ( ) != otherChild . getLength ( ) ) return false ; for ( int i = 0 ; i < thisChild . getLength ( ) ; i ++ ) if ( thisChild . item ( i ) . isEqualNode ( otherChild . item ( i ) ) ) return false ; } return true ; }
{@inheritDoc}