<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.elementContentType.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.elementContentType</api:function-name><api:suggest>xdmp.elementcontenttype</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>elementcontenttype</api:suggest><api:function-link mode="xquery" fullname="xdmp:element-content-type">/apidoc/8.0/xdmp:element-content-type.xml</api:function-link><api:function mode="javascript" name="elementContentType" type="builtin" lib="xdmp" category="Extension" subcategory="Extension" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.elementContentType"><api:summary>
  Returns the schema-defined content-type of an element
  ("empty", "simple", "element-only", or "mixed").
</api:summary><api:params><api:param name="element" type="element()"><api:param-description>
    An element node.
  </api:param-description><api:param-name>element</api:param-name><api:param-type>Node</api:param-type></api:param></api:params><api:return>String</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.elementContentType(
  xdmp.unquote('&lt;html xmlns="http://www.w3.org/1999/xhtml"/&gt;')
     .next().value.root);
=&gt; "element-only"
</pre></api:example></api:function></api:function-page>