==BaseX Standalone==
;Console command Launch the interactive mode:
:<code>
> basex
</code>
All available Available command-line flags options can be listed by adding with the <code>-h</code> to the callflag:
:<code>
> basex -h
-c<cmd> Execute database command(s)
-d Activate debugging mode
-i<fileinput> Open initial file or database
-o<file> Write output to file
-q<expr> Execute XQuery expression
-u Modifiy original files after updates
-v/V Show (all) process info
-w wrap query result to xmlRetain whitespaces from source files
-z Skip output of results
</pre>
The command-line flags have the following meaning:
{| class="wikitable"
|- valign="top"
! width='70' | Flag
! Description
! width='165' | Examples
|- valign="top"
| <code>[file]</code>
| Execute the specified XQuery file.
|
|- valign="top"
| <code>-c<cmd></code>
| Launch database commands and skip interactive mode. The flag should be placed last, as all remaining characters are interpreted as commands. Several commands can be separated by semicolons.
| <code>-c"list;info"</code>
|- valign="top"
| <code>-d</code>
| Turn on debugging. Debugging information is output to ''standard error''.
|
|- valign="top"
| <code>-i<input></code>
| Open a database or XML document specified by the argument. The opened input may be further processed by an XQuery expression.
| <code>-iitems.xml -q"//item"</code>
|- valign="top"
| <code>-o<file></code>
| Command and query output is written to the specified file.
| <code>-p9999</code>
|- valign="top"
| <code>-q<expr></code>
| Execute the specified string as XQuery expression. The flag should be placed last, as all remaining characters are interpreted as XQuery.
| <code>-q"doc('input')//head"</code>
|- valign="top"
| <code>-s<pars></code>
| Specify parameters for serializing XQuery results, as specified in the [http://www.w3.org/TR/xslt-xquery-serialization/ W3C XQuery Serialization] document. Key/value pairs are separated by equality signs (<code>=</code>).
| <code>-smethod=text</code>
|- valign="top"
| <code>-v</code>
| Process information is written to ''standard output''.
|
|- valign="top"
| <code>-V</code>
| Detailed query information is written to ''standard output'', including compilation and profiling steps.
|
|- valign="top"
| <code>-w</code>
| By default, whitespaces around text nodes are chopped when a database is created. This flag can be specified to suppress chopping.
|
|- valign="top"
| <code>-z</code>
| Skip the serialization of XQuery results. This flag may be useful for analyzing query plans.
|
|}
[[Category:Beginner]]