<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.describe.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.describe</api:function-name><api:suggest>xdmp.describe</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>describe</api:suggest><api:function-link mode="xquery" fullname="xdmp:describe">/apidoc/8.0/xdmp:describe.xml</api:function-link><api:function mode="javascript" name="describe" type="builtin" lib="xdmp" category="Extension" subcategory="XQuery Context" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.describe"><api:summary>
  Returns a string representing the
  description of a given item sequence.  If you take
  the output of the <code xmlns="http://www.w3.org/1999/xhtml">xdmp:describe</code> function and evaluate
  it as an XQuery program, it returns the item(s) input to the
  function.
</api:summary><api:params><api:param name="item" type="item()*"><api:param-description>
    The item sequence whose description is returned.
  </api:param-description><api:param-name>item</api:param-name><api:param-type>ValueIterator</api:param-type></api:param><api:param name="max-sequence-length" type="xs:unsignedInt?" optional="true"><api:param-description>
    Represents the maximum number of items per sequence to print.
    The default is 3.  () means no maximum.
  </api:param-description><api:param-name>max-sequence-length</api:param-name><api:param-type>Number?</api:param-type></api:param><api:param name="max-item-length" type="xs:unsignedInt?" optional="true"><api:param-description>
    Represents the maximum number of characters per item to print.
    The default is 64.  The minimum is 8.  () means no limit.
  </api:param-description><api:param-name>max-item-length</api:param-name><api:param-type>Number?</api:param-type></api:param></api:params><api:return>String</api:return><api:usage>
  <p xmlns="http://www.w3.org/1999/xhtml">If you specify an item that is in a database, <code>xdmp:describe</code>
  returns the path to the item (or to the items if you specify multiple items).
  If the item or items are constructed in XQuery, then it prints out the item,
  truncating the characters in each item according to the
  <code>maxItmLen</code> parameter.
  </p>
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.describe(fn.currentDate());

=&gt; xs.dateTime("2014-11-06T08:00:00")
</pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var x = xdmp.toJSON({key:"value"});
xdmp.describe(x);

  =&gt; document{{"key":"value"}}
</pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
//  assume /mydoc.json is a JSON document with the following content:
//    {key: "value"}
xdmp.describe(cts.doc("/mydoc.json").root.key)

  =&gt; fn.doc("/mydoc.json")/text("key")
</pre></api:example></api:function></api:function-page>