XmlContainer::getDocument |
![]() ![]() |
#include <DbXml.hpp>XmlDocument XmlContainer::getDocument(DbTxn *txnid, u_int32_t id, u_int32_t flags);
The XmlContainer::getDocument method returns the document identified by the id parameter.
If the operation is to be transaction-protected, the txnid parameter is a transaction handle returned from DbEnv::txn_begin; otherwise, NULL.
The flags value must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
Because the XmlContainer::getDocument interface will not hold locks across Berkeley DB interface calls in non-transactional environments, the DB_RMW flag to the XmlContainer::getDocument call is meaningful only in the presence of transactions.
If the specified document is not in the container, the XmlContainer::getDocument method will return DB_NOTFOUND. Otherwise, the XmlContainer::getDocument method throws an exception that encapsulates a non-zero error value on failure.
If the operation was selected to resolve a deadlock, the XmlContainer::getDocument method will fail and throw a DbDeadlockException exception.
The XmlContainer::getDocument 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::getDocument 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.
![]() ![]() |