Loading TOC...

MarkLogic 12 EA 2 Product Documentation
map:entry

map:entry(
   $key as xs:string,
   $value as item()*
) as map:map

Summary

Constructs a new map with a single entry consisting of the key and value specified as arguments. This is particularly helpful when used as part of an argument to map:new().

Parameters
key The map key.
value The map value.

Example

<result>{ map:entry("a","aardvark") }</result>

=>
<result>
  <map:map xmlns:map="http://marklogic.com/xdmp/map" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <map:entry key="a">
      <map:value xsi:type="xs:string">aardvark</map:value>
    </map:entry>
  </map:map>
</result>

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