XmlManager::loadContainer

API Ref

#include <DbXml.hpp>

void XmlManager::loadContainer(const std::string name, std::istream *in, unsigned long *lineno, XmlUpdateContext &context)


Description: XmlManager::loadContainer

Loads data from the specified stream into the container. The container's existing contents are discarded and replaced with the documents from the stream.

The specified input stream should contain data as created by XmlManager::dumpContainer.

The container must be closed; the system throws an exception if the container is open.

The container must be have been opened at least once; the system throws an exception if the underlying files have not yet been created.

Parameters

name
The name of the container to load.
in
The input stream from which the container is to be loaded.
lineno
The application uses lineno to specify the starting line number in the stream that is to be read. The system uses the same parameter to return the line number of the last line read from the stream.
context
The XmlUpdateContext object to use for the load.

Errors

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

CONTAINER_OPEN
The container is open.
DATABASE_ERROR
An error occurred in an underlying Berkeley DB database. The XmlException::getDbErrno method will return the error code for the error.

APIRef

Copyright (c) 1996,2007 Oracle. All rights reserved.