XmlManager::openContainer API Ref

#include <DbXml.hpp>

XmlContainer XmlManager::openContainer(const std::string &name) XmlContainer XmlManager::openContainer( XmlTransaction &txn, const std::string &name) XmlContainer XmlManager::openContainer( const std::string &name, const XmlContainerConfig &config) XmlContainer XmlManager::openContainer( XmlTransaction &txn, const std::string &name, const XmlContainerConfig &config) XmlContainer XmlManager::openContainer( const std::string &name, const XmlContainerConfig &flags, XmlContainer::ContainerType type, int mode) XmlContainer XmlManager::openContainer( XmlTransaction &txn, const std::string &name, const XmlContainerConfig &flags, XmlContainer::ContainerType type, int mode)


Description: XmlManager::openContainer

Opens a container, returning a handle to an XmlContainer object. Unless the config or flags parameter is set to true using XmlContainerConfig::setAllowCreate, the container must already exist at the time that this method is called or an exception is thrown.

Use XmlManager::createContainer, or set XmlContainerConfig::setAllowCreate to true for the flags or config parameter on this method, to create and open a new container.

Containers always remain open until the last handle referencing the container is destroyed.

The name provided here must be unique for the environment or an exception is thrown.


Description: XmlManager::openContainer(XmlTransaction &txn, const std::string &name)

Opens the identified container. Unless XmlContainerConfig::setAllowCreate was set to true and assigned using XmlManager::setDefaultContainerConfig, the container must have previously been created or an exception is thrown.

Parameters
txn name

Errors

The XmlManager::openContainer method may fail and throw XmlException, encapsulating one of the following non-zero errors:


CONTAINER_NOT_FOUND

Description: XmlManager::openContainer(XmlTransaction &txn, const std::string &name, const XmlContainerConfig &flags)

Opens a container. Unless XmlContainerConfig::setAllowCreate was set to true for flags, the container must have previously been created or an exception is thrown.

Parameters
txn name flags The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
DB_CREATE DB_READ_UNCOMMITTED DB_EXCL DB_MULTIVERSION DB_NOMMAP DB_RDONLY DB_THREAD DBXML_CHKSUM DBXML_ENCRYPT DB_TXN_NOT_DURABLE DBXML_INDEX_NODES DBXML_NO_INDEX_NODES DBXML_STATISTICS DBXML_NO_STATISTICS DBXML_TRANSACTIONAL DBXML_ALLOW_VALIDATION
config

Errors

The XmlManager::openContainer method may fail and throw XmlException, encapsulating one of the following non-zero errors:


CONTAINER_CONTAINER_NOT_FOUND

INVALID_VALUE

Description: XmlManager::openContainer(XmlTransaction &txn, const std::string &name, XmlContainer::ContainerType type, const XmlContainerConfig &flags, int mode)

Opens a container. Unless XmlContainerConfig::setAllowCreate was set to true for flags, the container must have previously been created or an exception is thrown.

Parameters
txn name type The container type must be one of the following values:
XmlContainer::NodeContainer XmlContainer::WholedocContainer
The default is XmlContainer::NodeContainer flags The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
DB_CREATE DB_READ_UNCOMMITTED DB_EXCL DB_MULTIVERSION DB_NOMMAP DB_RDONLY DB_THREAD DBXML_CHKSUM DBXML_ENCRYPT DB_TXN_NOT_DURABLE DBXML_INDEX_NODES DBXML_NO_INDEX_NODES DBXML_STATISTICS DBXML_NO_STATISTICS DBXML_TRANSACTIONAL DBXML_ALLOW_VALIDATION
mode

Errors

The XmlManager::openContainer method may fail and throw XmlException, encapsulating one of the following non-zero errors:


CONTAINER_CONTAINER_NOT_FOUND

INVALID_VALUE

APIRef

Copyright (c) 1996-2009 Oracle. All rights reserved.