
op:xml-comment( $content as item() ) as map:map
This function constructs an XML comment with the atomic value.
| Parameters | |
|---|---|
| $content | The comment text. |
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.