Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Upload a directory of XML files into eXist-db, with XQuery
xquery version "3.0";
(: Set the absolute file path appropriate for your OS :)
let $source-directory :=
(: Mac :)
(: '/Users/Joe/workspace/myapp/data' :)
(: Windows :)
let $target-collection :=
xmldb:store-files-from-pattern($target-collection, $source-directory, '*.xml')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment