Loading TOC...

PatchBuilderPlan.prototype.remove

PatchBuilderPlan.prototype.remove(
   path as String
) as PatchBuilderPlan

Summary

Delete a node.

Parameters
path The path to delete.

Example

'use strict';
declareUpdate();
const op = require('/MarkLogic/optic'); 
const docDescriptors = [{uri: '/optic/update/write4.xml',doc:xdmp.unquote("<doc><action>write4</action></doc>")},
                        {uri:  '/optic/update/write5.xml',doc:xdmp.unquote("<doc><action>write4</action></doc>")}]
op.fromDocDescriptors(docDescriptors)
.patch(op.col('doc'),
       op.patchBuilder('/doc')
         .remove("action")
      )
.write()
.result();
  

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