XmlDocument::setContent

#include <DbXml.hpp>

void XmlDocument::setContent(const std::string &content)

void XmlDocument::setContent(const XmlData &content)

Sets the document's content to the provided content. If this document is a new document (that is, its name is currently not in use by another document in the container), you can add it to a container using XmlContainer::putDocument. If you are updating an already existing document, you can update the document in the container using XmlContainer::updateDocument.

Parameters

content

The string or XmlData object containing the new document contents. Note that the document contents must be well-formed XML. However, in the event of incorrect content, an exception is not thrown until an attempt is made to place the contents into a container using either XmlContainer::putDocument or XmlContainer::updateDocument.

Class

XmlDocument

See Also

XmlDocument Methods