MarkLogic Server 11.0 Product Documentation
Element.isSameNode

Element.isSameNode(
   node as Node
) as Boolean

Summary

This is inherited from the XMLNode object.

Whether this node is the same exact node as another node.

Parameters
node The node to compare this node to.

Usage Notes

This is identity check. For equality, use isEqualNode instead.

Example

// Cannot be true, ever: nodes are in only one document
cts.doc("example.xml").firstChild.isSameNode(
  cts.doc("example2.xml").firstChild)

==> false
Powered by MarkLogic Server | Terms of Use | Privacy Policy