Changes

Jump to navigation Jump to search
71 bytes added ,  20:17, 13 October 2011
Various XQuery functions exist to access the XML documents in databases and other locations:
* <code>db:open("dbname", "path/to/docs")</code>: (only) returns documents that are found in the specified database.* <code>collection("path/to/docs")</code>: returns the documents that are either found in the database specified in the argument, or at the specified location(file path or URL).* <code>doc("path/to/document.xml")</code>: returns a single document found at the specified location(file path or URL). If a database already exists for the specified fileaddressed resource, it is opened instead.
===Raw Files===
* The <code>[[Commands#RETRIEVE|RETRIEVE]]</code> command returns raw files without modifications.
* The XQuery function <code>db:retrieve("dbname", "path/to/docs")</code> returns raw files in their Base64 representation. By choosing <code>"method=raw"</code> as [[Serialization|Serialization Option]] parameter, the data is returned in its raw form:
<pre class="brush:xquery">
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu