Changes

Jump to navigation Jump to search
113 bytes removed ,  16:32, 9 December 2010
no edit summary
==Collection==
===Creation of a collection===
<p>You can create a collection either within the GUI or in the console version of BaseX.</p> <ul> <li>*<b>GUI</b>: choose File &#187; New &#187; Browse &#187; choose directory and press OK</li> <li>*<b>Console</b>: enter <code>basex -c "create db dbname /path/to/collection"</code><br/></li> </ul>
===Manage Collections===
<p>Additionaly to the creation with your choosen xml files you can start with creating an empty
collection and then add your xml files to it. Note that the <code>add</code> and <code>delete</code>
commands just operate on an opened database.</p> <ul> <li>Create an empty database: <code>create db example</code></li> <li> [[Commands#Add|Add]] a document: <code>add example.xml</code></li> <li> [[Commands#Delete|Delete]] a document: <code>delete example.xml</code></li> </ul>
*Create an empty database: <pcode>create db example</code> * [[Commands#Add|Add]] a document: <code>add example.xml</code> * [[Commands#Delete|Delete]] a document: <code>delete example.xml</code> For more information see our [[BaseX & Collections|collection tutorial]].</p>
===Access documents in collections===
<p>The XQuery <code>collection()</code> function can be used to access documents in collections:</p> <ul> <li>*Returning all documents of collection ("dbname"):<br/> <code>for $doc in collection("dbname") return base-uri($doc)</code></li> <li>*Access a specific document ("test") in collection ("dbname"):<br/> <code>collection("dbname/test")//*</code></li> </ul>
administrator, Bureaucrats, editor, Interface administrators, reviewer, Administrators
400

edits

Navigation menu