Loading TOC...

NodeBuilder.addText

NodeBuilder.addText(
   $text as String
) as This NodeBuilder object

Summary

Add a text node to the node tree the builder is building.

Parameters
$text The contents of the text node.

Usage Notes

Adjacent text nodes will be merged in the tree produced by the builder

Example

var builder = new NodeBuilder();
builder.startElement("para");
  builder.addText("This is part of my paragraph. ");
  builder.addText("And this is more of it. ");
  builder.addText("In the end, they'll only be one text node. ");
builder.endElement();
builder.toNode();

Comments

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