dbxml |
dbxml [-ctVvx] [-h home] [-P password] [-s script]
The dbxml utility provides an interactive shell that you can use to manipulate containers, documents and indices, and to perform XQuery queries against those containers.
dbxml uses an optional Berkeley DB home (environment) directory, which defaults to the current directory. An attempt is made to join an existing environment; if that fails, a private environment is created in the specified location. dbxml has a concept of a default open container; that is, the container upon which container operations such as adding and deleting indices are performed. The default container is set by use of the createContainer and openContainer commands. An in-memory container can be created using the command, createContainer "". This is useful for using dbxml without file system side effects.
For a list of the command available in the shell, use the help command. For help on a specific command, pass the command's name to the help command. For example:
dbxmlsh> help createContainer
The options are as follows:
For example, the following is the contents of a script that creates a container, loads several files into it, performs a query, and then prints the results:
createContainer myContainer.dbxml putDocument a {<a><b name="doc1">doc1 n1</b><c>doc1 n2</c></a>} putDocument a {<a><b name="doc2">doc2 n1</b><c>doc2 n2</c></a>} putDocument a {<a><b name="doc3">doc3 n1</b><c>doc3 n2</c></a>} query collection("myContainer.dbxml")/a/b print
Note that if you are running this utility against an existing environment, and that environment is transactional, this option will be automatically enabled.
If you are using dbxml to manipulate containers that are managed by an existing database environment, you must specify the path to that existing database environment. dbxml cannot be used to create environment files that can be shared with other applications. It will either create a private environment, or join an existing, shareable environment created by another application.
Copyright (c) 1996-2005 Sleepycat Software, Inc. - All rights reserved.