Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created April 6, 2020 13:52
Show Gist options
  • Save ableasdale/6d7333343ab21754e515d8f9a8664254 to your computer and use it in GitHub Desktop.
Save ableasdale/6d7333343ab21754e515d8f9a8664254 to your computer and use it in GitHub Desktop.
MarkLogic: xdmp:multipart-decode example for decoding the parts of an outlook .eml file
xquery version "1.0-ml";
declare variable $BIN := xdmp:document-get("/Users/ableasdale/Downloads/Mail Attachment.eml", <options xmlns="xdmp:document-get"><format>binary</format></options>);
xdmp:multipart-decode("_006_130CEAC8798504479C0F9760840E6AAA068FD0CDEXCHG10BE01mark_",
$BIN/node(),
<options xmlns="xdmp:zip-get"><format>binary</format></options>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment