XmlContainer

API Ref

#include <DbXml.hpp>

class DbXml::XmlContainer { public: XmlContainer(DbEnv *dbenv, const string &name, u_int32_t flags); ~XmlContainer(); ... };


Description: XmlContainer

The XmlContainer class encapsulates a document container and its related indices and statistics. XmlContainer exposes methods for managing the storage and retrieval of XmlDocument objects.

The XmlContainer constructor creates a new XmlContainer handle within the given environment (if any), and sets the container's name. A copy constructor and assignment operator are not provided for this class.

The XmlContainer destructor closes the container if it is open when the container is destroyed. Any exception thrown during the close is discarded. In normal circumstances, applications that open a container should call close and check that it succeeds. The behavior of the destructor is only intended for use in cases where a failure during close would be ignored.

Parameters

dbenv
If a dbenv value is specified, the container is created within the specified Berkeley DB environment and all operations are performed within the context of that environment. The user is expected to suitably configure the environment for their particular application. If a dbenv value is not specified (it is left null), the container is not created in a Berkeley DB environment.

name
The name argument is used as the name of an underlying file that will be used to store container content. We suggest using the file extension '.dbxml' for ease of identification, for example 'mydata.dbxml'. The container file is created in the directory specified within the Berkeley DB environment. The current working directory will be used if a Berkeley DB environment is not provided. A memory only container can be created by passing an empty string for the container name.

flags
The flags value must be set to zero or the following value:

DB_XA_CREATE
Create a database to be accessed by applications running under an X/Open conformant Transaction Manager. The database will be opened in the environment specified by the OPENINFO parameter of the GROUPS section of the ubbconfig file. See the XA Resource Manager chapter in the Reference Guide for more information.

Class

XmlContainer, XmlDocument, XmlException, XmlIndexSpecification, XmlQueryContext, XmlQueryExpression, XmlResults, XmlUpdateContext, XmlValue

APIRef

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