Created
April 21, 2014 14:10
-
-
Save joewiz/11143857 to your computer and use it in GitHub Desktop.
Upload a directory of XML files into eXist-db, with XQuery
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.0"; | |
(: Set the absolute file path appropriate for your OS :) | |
let $source-directory := | |
(: Mac :) | |
(: '/Users/Joe/workspace/myapp/data' :) | |
(: Windows :) | |
'C:\Users\wicentowskijc\workspace\myapp\data' | |
let $target-collection := | |
'/db/apps/myapps/data' | |
return | |
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