Changes

Jump to navigation Jump to search
34 bytes added ,  15:30, 27 February 2020
no edit summary
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:
<pre classsyntaxhighlight lang="brush:xml">
CREATE DB test
ADD TO embedded.xml <root>embedded</root>
XQUERY <hits>{ count(//text()) }</hits>
CLOSE
</presyntaxhighlight>
===XML Syntax===
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:
<pre classsyntaxhighlight lang="brush:xml">
<commands>
<create-db name='test'/>
<close/>
</commands>
</presyntaxhighlight>
==Glob Syntax==
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu