==XQuery==
The [[{{Function|Database Module#db:add|db:add]] }} and [[{{Function|Database Module#db:update|db:update]] }} functions can also be used to add new XML documents to the database. The following example query uses the internal XML parser and adds all files to the database <code>DB</code> that are found in the directory <code>2Bimported</code>:
<syntaxhighlight lang="xquery">