<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.externalBinary.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.externalBinary</api:function-name><api:suggest>xdmp.externalbinary</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>externalbinary</api:suggest><api:function-link mode="xquery" fullname="xdmp:external-binary">/apidoc/8.0/xdmp:external-binary.xml</api:function-link><api:function mode="javascript" name="externalBinary" type="builtin" lib="xdmp" category="Extension" subcategory="MarkLogic Server" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.externalBinary"><api:summary>
  Returns an external binary node.
</api:summary><api:params><api:param name="path" type="xs:string"><api:param-description>
    Filesystem path to the external binary file.
  </api:param-description><api:param-name>path</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="starting-location" type="xs:double" optional="true"><api:param-description>
    The new binary node starts at the byte position indicated by
    <code xmlns="http://www.w3.org/1999/xhtml">starting-location</code>. The first byte is at location 1.
    The default value is 1.
  </api:param-description><api:param-name>starting-location</api:param-name><api:param-type>Number</api:param-type></api:param><api:param name="length" type="xs:double" optional="true"><api:param-description>
    The length in bytes of the content in the new binary node. Omitting
    the length has performance implications; see usage notes.
  </api:param-description><api:param-name>length</api:param-name><api:param-type>Number</api:param-type></api:param></api:params><api:return>binary()</api:return><api:usage>
  <p xmlns="http://www.w3.org/1999/xhtml">
   If no length is provided, the length is calculated from the starting
   position and the filesystem length of the external file. If the file
   does not exist when the length is calculated, <code>XDMP-MISSINGFILE</code>
   is thrown.
  </p>
  <p xmlns="http://www.w3.org/1999/xhtml">
   If a length is provided, the length is trusted. That is, no attempt is
   made to confirm the existence or read the length of the external file.
   Therefore, including the length in the call (if known) results in the
   best performance during document creation.
  </p>
</api:usage><api:privilege>
  <p xmlns="http://www.w3.org/1999/xhtml"><code>http://marklogic.com/xdmp/privileges/xdmp-external-binary</code></p>
</api:privilege><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
  xdmp.externalBinary("/testdata1/logo.gif", 1, 2456);

  =&gt; A binary node representing the external file at
     /testdata1/logo.gif, beginning at offset 1, with
     a length of 2456 bytes.
</pre></api:example></api:function></api:function-page>