MarkLogic 9 Product Documentation
op.xmlComment

op.xmlComment(
   value as String
) as commentNode

Summary

This function constructs an XML comment with the atomic value.

Parameters
value The comment text.

Example


const op = require('/MarkLogic/optic');

const employees = op.fromView('main', 'employees');
          
employees.where(op.gt(op.col('EmployeeID'), 1))
        .select(['EmployeeID', 
                 op.as('node', 
                       op.xmlComment(op.col('Position'))), 
                 op.as('kind', 
                       op.xdmp.nodeKind(op.col('node')))
                ])
        .orderBy('EmployeeID')
        .result();
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy