Loading TOC...

MarkLogic 12 EA 2 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()
  

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