Changes

Jump to navigation Jump to search
33 bytes added ,  12:59, 26 October 2012
|-
| '''Summary'''
|Adds documents specified by {{Code|$input}} to the database specified by the [[#Database Nodes|database node]] {{Code|$db}} and the specified {{Code|$path}}.<br/>{{Code|$input}} may be a string or a node different than attribute.
|-
| '''Errors'''
|{{Error|FODC0002|XQuery Errors#Functions Errors}} {{Code|$input}} is a string representing a path, which cannot be readpoints to an unknown resource.<br/>{{Error|FOUP0001|XQuery Errors#Update Errors}} {{Code|$input}} is neither string nor a document node.
|-
| '''Examples'''
* {{Code|db:add("DB", "/home/dir/doc.xml")}} adds the file {{Code|/home/dir/doc.xml}} to the database {{Code|DB}}.
* {{Code|db:add("DB", "<a/>", "doc.xml")}} adds a document with content {{Code|&lt;a/&gt;}} to the database {{Code|DB}} under the name {{Code|doc.xml}}.
* {{Code|db:add("DB", document { <a/> }, "doc.xml")}} adds the a document node to the database {{Code|DB}} under the name {{Code|doc.xml}}.
* {{Code|db:add("DB", "/home/dir", "docs/dir")}} adds all documents in {{Code|/home/dir}} to the database {{Code|DB}} under the path {{Code|docs/dir}}.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu