XmlContainer::deleteDocument |
![]() ![]() |
#include <DbXml.hpp>void XmlContainer::deleteDocument(DbTxn *txnid, u_int32_t id, u_int32_t flags);
The XmlContainer::deleteDocument method removes the document identified by the id parameter from the container.
If the operation is to be transaction-protected (other than by specifying the DB_AUTO_COMMIT flag), the txnid parameter is a transaction handle returned from DbEnv::txn_begin; otherwise, NULL.
The flags value must be set to 0 or the following value:
If the specified document is not in the container, the XmlContainer::deleteDocument method will return DB_NOTFOUND. Otherwise, the XmlContainer::deleteDocument method throws an exception that encapsulates a non-zero error value on failure.
If the operation was selected to resolve a deadlock, the XmlContainer::deleteDocument method will fail and throw a DbDeadlockException exception.
The XmlContainer::deleteDocument method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods. If a catastrophic error has occurred, the XmlContainer::deleteDocument method may fail and throw a DbRunRecoveryException, in which case all subsequent Berkeley DB calls will fail in the same way.
XmlDocument::getAttributeValue, XmlDocument::getContent, XmlDocument::getID, XmlDocument::getName, XmlDocument::getType, XmlDocument::setContent, XmlDocument::setName, and XmlDocument::setType.
![]() ![]() |