xqbridge -q [ options ] queryFile [outFile]
xqbridge -i [ options ] mapFile xmlFile1 [xmlFileI]*
The XQuark Bridge
tool is used to extract XML
data from a
database, using the XQuery language, and to insert XML data into a
database, using a mapping specification. The first behavior is obtained
using the -q
option, and the second one using the -i
option.
The XQuark Bridge
tool uses several environment
variable:
JAVA_HOME
: this variable must be set to
the directory where the JRE 1.3.1 or 1.4.x can be found. If not set,
the script will run the first java executable found on the execution
path.XQ_CLASSPATH
: this variable defines the
additional classpath which is appended to the standard one
and to the XQuark Bridge distribution jars before running the software.
It is used to load the JDBC driver classes and
JAXP-compliant parsers that are not part of the delivery, as well as
user-defined Java-based generators used in insertion mode
(see user
documentation
for details). Alternatively, this classpath can be controlled by setting
the xqbridge.classpath
property to the appropriate value .XQBRIDGE_HOME
:
this variable must be set to the directory where XQuark Bridge was
installed.
When using XQuark Bridge
in insertion mode, the
user can define Java-based generators used to fill column values. Those
classes need to be in the classpath used by the command-line tool. This
can be controlled by setting the standard CLASSPATH
environment variable to the appropriate value.
In order to work, XQuark Bridge
needs to
connect to a
database. The installation guide
describes how to set up the default connection. The default setup can
be overidden by specifying connection parameters on the command line
(see options below), by creating a Java
properties file containing the appropriate parameters, or by creating
an XML configuration file (see XQuery Manual for details).
The properties that must be set in the properties file are:
database.url
: the JDBC connection string to the
database instancedatabase.user
: the database userdatabase.password
: the database passwordxqbridge.classpath
: the additional classpath that is used to
locate database drivers and user-defined generators used in insertion modeXQuark Bridge attemps to load all the JDBC drivers that it supports from the classpath, so there is no need to specify the JDBC driver class name.
If no properties or configuration file is specified on the command
line, XQuark Bridge
will try to load the first XQBridge.properties
file found in the classpath.
-q
option is used, each line of the file must contain a query file and an
optional
output file. When the -i
option is used, each line of the
file
must contain a mapping specification file and one or several XML files.
Lines starting with # are ignored.