Changes

Jump to navigation Jump to search
445 bytes added ,  15:55, 23 January 2015
no edit summary
| '''Errors'''
|{{Error|BXDB0002|XQuery Errors#BaseX Errors}} The addressed database does not exist or could not be opened.
|-
| '''Examples'''
| Export all files as text:<br/>
<pre class="brush:xquery">
db:export("DB", "/home/john/xml/texts", map { 'method': 'text' })
</pre>
The following query can be used to export parts of the database:
<pre class="brush:xquery">
let $target := '/home/john/xml/target'
for $doc in db:open('DB', 'collection')
let $path := $target || db:path($doc)
return (
file:create-dir(file:parent($path)),
file:write($path, $doc)
)
</pre>
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu