dbxml_shell |
dbxml_shell [-xtv] [-s script] home container
The dbxml_shell utility provides an interactive shell that you can use to manipulate containers, documents and indices, and to perform XQuery queries against those containers.
container is optional and it specifies the default container; that is, the container upon which container operations (such as adding and deleting indices) are performed. The container that you specify must already exist. If you want to use dbxml_shell to create and open a container, use the dbxml_shell create command.
home is the path to the environment home directory. The directory that you provide here must exist, but the database environment files are created for you if they do not already exist. Note that if you are using dbxml_shell on existing containers that are managed by an existing database environment, you must specify the path to that existing database environment. If you attempt to use a local set of environment files for dbxml_shell and then share XML containers with some other environment, the results are unpredictable and can include application crashes or database corruption.
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 create
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:
create myContainer.dbxml adddocument a {<a><b name="doc1">doc1 n1</b><c>doc1 n2</c></a>} adddocument a {<a><b name="doc2">doc2 n1</b><c>doc2 n2</c></a>} adddocument 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 if transactional writes are used in that environment, then a failure to specify this option can render your containers non-recoverable if you use this utility to write to those containers. You should never mix transactional and non-transactional writes in the same container.
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.