#include <DbXml.hpp> void XmlContainer::updateDocument(XmlDocument &document, XmlUpdateContext &context) void XmlContainer::updateDocument(XmlTransaction &txn, XmlDocument &document, XmlUpdateContext &context)
Updates an
XmlDocument
in the container. The document must have
been retrieved from the container using XmlContainer::getDocument,
XmlManager::query, or XmlQueryExpression::execute. It is possible
to use a constructed XmlDocument
object, if
its name is set to a valid name in the container. The document must
still exist within the container. The document content is indexed
according to the container indexing specification, with index keys
being removed for the previous document content, and added for the
updated document content.
If the operation is to be transaction-protected, the
txn
parameter is an
XmlTransaction
handle
returned from XmlManager::createTransaction.
The
XmlDocument
to be updated in the
XmlContainer
.
The XmlContainer::updateDocument
method may
fail and throw
XmlException
, encapsulating one of the following
non-zero errors:
An error occurred in an underlying Berkeley DB database. The XmlException::getDbErrno method will return the error code for the error.