#include <DbXml.hpp> void XmlDocument::setContentAsEventReader(XmlEventReader &reader)
Sets the document's content to the provided reader. 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.
The XmlEventReader reference is used to read the content on demand. When the reading is done, the XmlEventReader::close method is called.
The content provided by the reader 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.
The event reader to be used for content creation. To create the reader, use one of XmlDocument::getContentAsEventReader, XmlValue::asEventReader, or implement an application-defined class derived from XmlEventReader .