Revision [474]

This is an old revision of ModuleMarkLogic made by DavidLee on 2009-04-10 16:41:07.


Mark Logic Module

Connectivity to a Mark Logic server is supported with an extension module.

Mark Logic support is via an Extension Module. It must be downloaded separately from xmlsh and added to the classpath in order to run.


Mark Logic extension module is on sourceforge in the marklogic package under xmlsh.
Dowload the latest binary from marklogic package

You also need the "xcc.jar" file from Mark Logic Developer Page (the Java XCC Distribution)


Place marklogic.jar and xcc.jar in a known directory and edit the CLASSPATH used for launching xmlsh.
This can be done by editing the win32\xmlsh.bat or unix/xmlsh startup scripts or whatever command is used to launch xmlsh.

Windows example, assuming marklogic.jar and xcc.jar are placed in the same directory as xmlsh.jar (%XMLSH%\lib) edit win32\xmlsh.bat and add before the java command

@set CLASSPATH=%CLASSPATH%;%XMLSH%\lib\marklogic.jar
@set CLASSPATH=%CLASSPATH%;%XMLSH%\lib\xcc.jar


Now you can startup xmlsh but you must import the extension module in order to use it.
Its recommended that you use a prefix for the import. The marklogic package is org.xmlsh.marklogic. To import the module using the "ml" prefix do the following.

$ import module ml=org.xmlsh.marklogic


To run Mark Logic commands you need to configure the connection information to access your Mark Logic server. All the Mark Logic commands require an environment variable, MLCONNECT to specify the connection. The format is the URI used by the XCC API.


Note: the Port is the port number of an XDBC "Host" defined on the Mark Logic server.

$ MLCONNECT=xcc://me:password@server:8003/Test

Instead of using an environment variable, you can also pass in the connection URI as a command argument using -c or -connect

$ ml:query -c xcc://me:password@server:8003/Test -q "'Hello World'"


Your now ready to run Mark Logic commands from within xmlsh.

The following commands are supported

Extension Modules

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki