Skip to content

Instantly share code, notes, and snippets.

@prestonmcgowan
Created October 10, 2019 18:53
Show Gist options
  • Save prestonmcgowan/44bfac8c3770c8603f6d760d3e8f6320 to your computer and use it in GitHub Desktop.
Save prestonmcgowan/44bfac8c3770c8603f6d760d3e8f6320 to your computer and use it in GitHub Desktop.
Unzip Documents from disk with MarkLogic
xdmp:document-load("/tmp/docs.zip")
;
declare namespace z = "xdmp:zip";
for $x in xdmp:zip-manifest(doc("/tmp/docs.zip"))//z:part/text()
return
xdmp:document-insert($x, xdmp:zip-get(doc("/tmp/docs.zip"), $x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment