Getting Started with Berkeley DB XML

for Java

Legal Notice

This documentation is distributed under an open source license. You may review the terms of this license at:

Oracle, Berkeley DB, Berkeley DB XML and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle.

Java™ and all Java-based marks are a trademark or registered trademark of Sun Microsystems, Inc, in the United States and other countries.

To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at:


Table of Contents

Conventions Used in this Book
For More Information
1. Introduction to Berkeley DB XML
XML Features
Database Features
Languages and Platforms
Getting and Using BDB XML
Documentation and Support
Library Dependencies
Building and Running BDB XML Applications
2. Exception Handling and Debugging
Debugging BDB XML Applications
3. XmlManager and Containers
Berkeley DB Environments
XmlManager Instantiation and Destruction
Managing Containers
Container Properties
Container Types
Deleting and Renaming Containers
4. Adding XML Documents to Containers
Input Streams and Strings
Adding Documents
Constructing Documents using Event Writers
Setting Metadata
5. Using XQuery with BDB XML
XQuery: A Brief Introduction
Referencing Portions of Documents using XQuery
Case Insensitive Searches
Navigation Functions
Using FLWOR with BDB XML
Retrieving BDB XML Documents using XQuery
The Query Context
Performing Queries
Working with External Functions
Implementing XmlExternalFunction
Implementing XmlResolver
Calling External Functions from XQuery
Examining Query Results
Examining Document Values
Examining Metadata
Copying Result Sets
Using Event Readers
6. Managing Documents in Containers
Deleting Documents
Replacing Documents
Modifying XML Documents
XQuery Update Introduction
Inserting Nodes Using XQuery Update
Deleting Nodes Using XQuery Update
Replacing Nodes Using XQuery Update
Renaming Nodes Using XQuery Update
Updating Functions
Transform Functions
Resolving Conflicting Updates
Compressing XML Documents
Turning Compression Off
Using Custom Compression
7. Using BDB XML Indices
Index Types
Path Types
Node Types
Key Types
Syntax Types
Specifying Index Strategies
Specifying Index Nodes
Indexer Processing Notes
Automatic Indexes
Managing BDB XML Indices
Adding Indices
Deleting Indices
Replacing Indices
Examining Container Indices
Working with Default Indices
Looking Up Indexed Documents
Verifying Indices using Query Plans
Query Plans
Using the dbxml Shell to Examine Query Plans
8. Administering Berkeley DB XML Applications
Temporary Files
A Note on Snapshot Isolation