Created
July 10, 2017 03:45
-
-
Save joewiz/aa8d84500b1f1478779cdf2cc1934348 to your computer and use it in GitHub Desktop.
Save a resource stored in eXist to the file system as a zip file
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
xquery version "3.1"; | |
(: Save a resource stored in eXist to the file system as a zip file :) | |
let $source := "/db/apps/frus-dates/data/frus-dates.xml" | |
let $destination := "/Users/joe/Downloads/frus-dates.zip" | |
let $preserve-collection-structure := false() | |
return | |
file:serialize-binary( | |
compression:zip(xs:anyURI($source), $preserve-collection-structure), | |
xs:anyURI($destination) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment