Database Reference
In-Depth Information
This shows the available arguments for using the RetrieveApp.
A complete example of using the application might look like the following, which
would download the resource
db/my-new-collection/large.xml
to the file in the cur‐
rent directory named
large.xml
:
java -jar xmldb-client-retrieve/target/xmldb-client-retrieve-1.0-example.jar
localhost
8080
/db/my-new-collection/large.xml admin > large.xml
Query example.
You can execute the QueryApp example like so:
java -jar xmldb-client-query/target/xmldb-client-query-1.0-example.jar
This shows the available arguments for using the QueryApp.
A complete example of using the application might look like the following, which
would find the family names of all of the people in all of the documents in the collec‐
tion
/db/my-new-collection
in the database:
java -jar xmldb-client-query/target/xmldb-client-query-1.0-example.jar
localhost 8080 "for \$person in //person return \$person/family"
/db/my-new-collection admin
On non-Windows platforms, you must escape the
$
character used
in XQuery for variables when sending the query in a command line
from the terminal by prefixing with a
\
character. If you do not
escape this symbol, the shell interpreter will try to interpret them as
environment variables, which will result in an invalid XQuery and
therefore an
org.exist.xmldb.XMLDBException
response from the
XML:DB server API.
Remove example.
You can execute the RemoveApp example like so:
java -jar xmldb-client-remove/target/xmldb-client-remove-1.0-example.jar
This shows the available arguments for using the RemoveApp.
A complete example of using the application might look like the following, which
would remove the collection
/db/my-new-collection
from the database:
java -jar xmldb-client-remove/target/xmldb-client-remove-1.0-example.jar
localhost
8080
/db/my-new-collection admin
RESTXQ
RESTXQ itself is not an API; rather, it is a framework that enables you to build your
own APIs. The beauty of this is that you can construct small and elegant application-
specific APIs for the Web or internal purposes using REST over HTTP.
Search WWH ::
Custom Search