Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created October 25, 2016 07:39
Show Gist options
  • Save ableasdale/7099a6e3703c3db10c576f09ea03c68e to your computer and use it in GitHub Desktop.
Save ableasdale/7099a6e3703c3db10c576f09ea03c68e to your computer and use it in GitHub Desktop.
Saving XML documents to the local filesystem for a support ticket
xquery version "1.0-ml";
declare variable $URIS as xs:string+ := ("/doc1.xml", "/doc2.xml", "/doc3.xml");
for $uri at $pos in $URIS
return xdmp:save("/tmp/" || $pos || ".xml", fn:doc($uri))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment