Loading TOC...

NodeBuilder.addComment

NodeBuilder.addComment(
   $comment as String
) as This NodeBuilder object

Summary

Add an XML comment node to the node tree the builder is building.

Parameters
$comment The text of the comment.

Usage Notes

Comment nodes may only be added to XML nodes.

Example

const builder = new NodeBuilder();
builder.startElement('example');
  builder.addComment('There is no content in this element, just a comment');
builder.endElement();
builder.toNode();

// Returns an XML element node equivalent to the following:
// <example><!--There is no content in this element, just a comment--></example>

Comments

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