NOTE: The eXist module is currently in PRE-ALPHA stage. For testing only. Do not use in production environements !
Connectivity to a eXist-db server is supported with an extension module.
eXist support is via an Extension Module. It must be downloaded separately from xmlsh and imported to run.
Dowload the latest binary from xmlsh files
Choose the "exist_ext" folder and download the latest release.
Suggested is to use $XMODPATH/exist and it should contain only the files from the bin/ directory (module.xml, exist_ext.jar)
Import the eXist extension in xmlsh with an "import module" statement.
The module can be found using the XMODPATH variable or explicitly by specifying the module.xml file
Copy the files in the "bin" direcectory to a directory named "exist" as a sub-directory of any path in the XMODPATH directory.
Then import the module using the "import module" command
Assuming you put the eXist files in the directory /usr/local/xmlsh/ext/exist
XMODPATH=/usr/local/xmlsh/ext import module e=exist
To run eXist commands you need to configure the connection information to access your eXist-db server. All exist commands require a connection string, and optional authentication and connection related parameters.
The connection string and (optional) authentication can be supplied via command line arguments or environment variables.
The examples shown assume environment variables.
Supported eXist Environment variables
|EXIST_CONNECT||Connection URL to REST protocol on your eXist server||http://localhost:8080/exist/rest|
Instead of using an environment variable, you can also pass in the connection URI as a command argument using -c or -connect, the username via -user and the password via -password.
e:query -c http://localhost:8080/exist/rest -q "'Hello World'"
eXist Common Options
The following commands are supported
|del||Deletes a resource|
|get||Gets a resource|
|invoke||Invokes a stored query|
|put||Puts (stores) a resource.|
|query||Invokes an 'ad-hoc' query|
|list||Lists contents of a collection|