isEqualNode: arg(3)
This method compares the node on which the method is invoked
with the node referenced by the other
parameter. The two nodes are
considered to be equal if:
They are of the same type
The following attributes are equal: nodeName
, localName
, namespaceURI
, prefix
, nodeValue
The attributes
maps
are equal (contain the same number of nodes that are equal to
one another)
The childNodes
lists
are equal (the child node trees are identical, and each child
passes this equality test with its counterpart in the other
tree)
For DocumentType
nodes only: the publicId
,
systemId
, internalSubset
, entities
, and notations
attributes must be
identical as well
The method returns true
if the nodes pass all of the above tests; otherwise, it returns
false
.