Skip to content

Instantly share code, notes, and snippets.

@tuurma
Created November 23, 2017 20:46
Show Gist options
  • Save tuurma/8a259d52abcd04df20bb15c7bd6501e6 to your computer and use it in GitHub Desktop.
Save tuurma/8a259d52abcd04df20bb15c7bd6501e6 to your computer and use it in GitHub Desktop.
move all documents from collection to another
xquery version "3.1";
for $i in collection('/db/apps/data/a')/*
return
xmldb:move('/db/apps/data/a', '/db/apps/data/a/b/', util:document-name($i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment