Changes

Jump to navigation Jump to search
581 bytes added ,  00:42, 23 September 2011
<code>SET PARSEROPT lines=yes</code>
 
===XQuery===
 
Again, the text parser can also be specified in the prolog of an XQuery expression, and
the [[Database Functions#db:add|db:add()]] or [[Database Functions#db:replace|db:replace()]]
function can be used to add the specified source files into the database.
The following example query adds all text files to the database <code>DB</code>
that are found in the directory <code>2Bimported</code> and its sub-directories:
 
<pre class="brush:xquery">
declare option db:parser "text";
 
for $file in file:list("2Bimported", true(), "*.txt")
return db:add('DB', $file)
</pre>
[[Category: Internals]]
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu