XmlContainer::deleteDocument

API Ref

#include <DbXml.hpp>

void XmlContainer::deleteDocument( DbTxn *txn, u_int32_t id, XmlUpdateContext *context=0, u_int32_t flags=0);

void XmlContainer::deleteDocument( DbTxn *txn, XmlDocument &document, XmlUpdateContext *context=0, u_int32_t flags=0);


Description: XmlContainer::deleteDocument

The XmlContainer::deleteDocument method removes the specified XmlDocument from the XmlContainer.

Parameters

txn
If the operation is to be transaction-protected, the txn parameter is a transaction handle returned from DbEnv::txn_begin, otherwise, NULL.

document
The XmlDocument to be deleted from the container.

context
(Optional) The update context within which the document is to be deleted. The context provides a performance improvement by caching objects that can be reused for multiple operations.

flags
Not currently used.

Errors

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

CONTAINER_CLOSED
The container is closed.

DATABASE_ERROR
An error occurred in an underlying Berkeley DB database. The XmlException::getDbError method will return the error code for the error.

DOCUMENT_NOT_FOUND
The specified document is not in the XmlContainer.

Description: XmlContainer::deleteDocument

The XmlContainer::deleteDocument method removes the specified XmlDocument from the XmlContainer.

Parameters

txn
If the operation is to be transaction-protected, the txn parameter is a transaction handle returned from DbEnv::txn_begin, otherwise, NULL.

id
The ID of the XmlDocument to be deleted from the container.

context
(Optional) The update context within which the document is to be deleted. The context provides a performance improvement by caching objects that can be reused for multiple operations.

flags
Not currently used.

Errors

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

CONTAINER_CLOSED
The container is closed.

DATABASE_ERROR
An error occurred in an underlying Berkeley DB database. The XmlException::getDbError method will return the error code for the error.

DOCUMENT_NOT_FOUND
The specified document is not in the XmlContainer.

Class

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

APIRef

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