MarkLogic 12 EA 1 Product Documentation
op:xml-comment

op:xml-comment(
   $content as item()
) as map:map

Summary

This function constructs an XML comment with the atomic value.

Parameters
$content The comment text.

Example

xquery version "1.0-ml";

import module namespace op="http://marklogic.com/optic"
     at "/MarkLogic/optic.xqy";

op:from-view("main", "employees")
           => op:select(("EmployeeID", op:as("node", op:xml-comment(op:col("Position")))))
           => op:order-by("EmployeeID")
           => op:result()
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy