Loading TOC...

NodeBuilder.endDocument

NodeBuilder.endDocument() as This NodeBuilder object

Summary

Close out the current document node.

Usage Notes

Document nodes must be completed before calling toNode() on the builder; an error will be raised if they are not. An error will also be raised if endDocument is called when there is an open element node.

Example

var builder = new NodeBuilder();
builder.startDocument();
  builder.addNode( ["array","of","strings"] );
builder.endDocument();
builder.toNode();

Example

var builder = new NodeBuilder();
builder.startDocument();
  builder.startElement("dangling")
  builder.addText("Some content");
builder.endDocument();
builder.toNode();

==> Error

Comments

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