Loading TOC...

temporal.nodeInsertAfter

temporal.nodeInsertAfter(
   temporal-collection as String,
   sibling as Node,
   new as Node,
   [temporal-doc-uri as String]
) as null

Summary

Adds an immediately following sibling to a node in a temporal document.

Parameters
temporal-collection The URI for the protected temporal collection in which the document is to belong. This must have been previously created by the temporal:collectionCreate function. All versions of the temporal document will be associated with this temporal collection.
sibling The sibling node to be followed by the new node.
new The new node to be inserted.
temporal-doc-uri The URI of the temporal document to be updated.

Usage Notes

The fourth argument "temporal-doc-uri" is not required for documents inserted with MarkLogic 9.0 version of temporal:documentInsert or later.

Attribute nodes cannot be followed by non-attribute nodes. Non-attribute nodes cannot be followed by attribute nodes. Element nodes cannot have document node children. Document nodes cannot have multiple roots. On-the-fly constructed nodes cannot be updated.

If you want to add a named node to a JSON document in JavaScript, use the NodeBuilder API to construct a named node.

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