### Berkeley DB Reference Guide: Berkeley DB XML |

### Programmer Notes

### Berkeley DB XML C++ API

The Berkeley DB XML API exposes seven main classes to the client application. They are: XmlContainer, XmlDocument, XmlResults, XmlQueryContext, XPathExpression, XmlException and XmlValue. The API also exposes the Berkeley DB C++ API DbEnv and DbTxn classes, which are not discussed in this document; please refer to the Berkeley DB documentation for information on Berkeley DB classes.

The Berkeley DB XML C++ API is encapsulated within the C++ namespace called DbXml. The namespace is provided to avoid naming collisions with application code, or other library interfaces.

### Memory Management

The Berkeley DB XML API methods return reference-counted object handles that are automatically de-allocated by the system once the object handle goes out of scope. The client application does not have to delete or free any object handles returned by the API.

### Threading and Process Management

Berkeley DB XML is designed to be thread-safe, and to work with any threads package. The XmlContainer class is free threaded, meaning that multiple threads can share an XmlContainer object. All other Berkeley DB XML classes are not free threaded, they should only be used by a single thread.

Berkeley DB XML executes within the process context of the client application, and multiple processes can share the same container.

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.