Loading TOC...

Document.nodeType

Document.nodeType as Number

Summary

This is inherited from the Node object.

Return the DOM code indicating the type of the node.

Usage Notes

In addition to the standard DOM codes, the following extension codes may be returned:

13
A binary node (binary documents)
14
A null node (JSON documents)
15
A boolean node (JSON documents)
16
A number node (JSON documents)
17
An array node (JSON documents)
18
An object node (JSON documents)

Example

function firstChildIsText(node) {
  return (node.nodeType==3);
};

firstChildIsText(
  fn.head(cts.doc("example.xml").xpath("./body/node()"));

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy