Loading TOC...

MarkLogic 9 Product Documentation
XMLDocument.isSameNode

XMLDocument.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

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.