Lines starting with <code>#</code> are interpreted as comments and are skipped. With the following script, a database is created, two documents are added to it, and a query is performed:
<syntaxhighlight pre lang="xml">
CREATE DB test
ADD TO embedded.xml <root>embedded</root>
The XML syntax provides more flexibility here. Multiple commands can be enclosed by a {{Code|<commands/>}} root element. Some commands, such as {{Command|ADD}}, allow you to directly embed XML documents. If you want to embed XML in XQuery expressions, entities should be encoded, or the {{Code|CDATA}} syntax should be used:
<syntaxhighlight pre lang="xml">
<commands>
<create-db name='test'/>