Database Reference
In-Depth Information
python StoreApp.py
A complete example of using the application might look like the following, which
would upload the file /tmp/large.xml to the collection /db/my-new-collection in eXist:
python StoreApp.py localhost 8080
/tmp/large.xml application/xml
/db/my-new-collection admin
XML:DB Remote API
The XML:DB API was developed by the XML:DB Initiative in the early 2000s with
the goal of creating a common standardized API for communicating with XML data‐
bases. While the API is no longer actively developed, it arguably fulfilled its goal and
gained adoption from several XML database vendors. The XML:DB API is really just
a set of Java interfaces that a vendor must implement. eXist either implements these
as function calls on its internal API for local embedded use (see “XML:DB Local API”
on page 366 ), or—more interestingly here for its remote use—uses its XML-RPC imple‐
mentation (see “XML-RPC API” on page 342 ) for network communication.
The main advantage of the XML:DB API is that it provides a complete Java client
library that you can use seamlessly from your Java applications without concern for
how the network communication with the eXist server is achieved. In practice there
is not much of a semantic difference between this and using a dynamic proxied XML-
RPC client approach. Whether you should use the XML:DB API or an XML-RPC
dynamic proxied client API really comes down to a matter of choice with regard to
the style of code that you wish to write. We feel that using the XML-RPC approach
offers greater flexibility, as you have full access to the API underlying the XML:DB
API; also the XML:DB API is becoming more limited due to its stagnation.
The downside of the XML:DB API is that it is only easily usable from Java, unless you
are willing to reverse-engineer the XML-RPC messages sent by the XML:DB API and
produce your own client library for a different programming language.
The base URI of the XML:DB Remote API server in eXist on a
default installation is xmldb:exist://localhost:8080/exist/xmlrpc .
Even though the URI scheme is xmldb , the URI points to eXist's
XML-RPC server, and the XML-RPC server itself uses HTTP.
Thus, XML:DB (as far as eXist is concerned) is really just more
XML-RPC performed over HTTP.
Using the XML:DB Remote API from Java
eXist provides a remote client library implementation of the XML:DB API, which can
be used from your own Java applications. If you wish to use it from your own appli‐
Search WWH ::




Custom Search