Created
October 10, 2019 18:53
-
-
Save prestonmcgowan/44bfac8c3770c8603f6d760d3e8f6320 to your computer and use it in GitHub Desktop.
Unzip Documents from disk with MarkLogic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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