Skip to content

Instantly share code, notes, and snippets.

@tuurma
Created July 5, 2017 09:58
Show Gist options
  • Save tuurma/093b8468343ee11b51afb2cce179135f to your computer and use it in GitHub Desktop.
Save tuurma/093b8468343ee11b51afb2cce179135f to your computer and use it in GitHub Desktop.
remove all documents in a collection
xquery version "3.1";
for $i in collection('/db/apps/temp')/*
return
xmldb:remove('/db/apps/temp', util:document-name($i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment