XmlResults::asEventWriter

#include <DbXml.hpp>

XmlEventWriter &XmlResults::asEventWriter()

Returns an instance of XmlEventWriter that can be used to write events into the XmlResults object. Please note that only one active XmlEventWriter is allowed for an XmlResults object.

The XmlResults object must be freshly created by XmlManager::createResults and empty or an exception is thrown. Multiple node and atomic value events can be written into the returned object. When the event writing is complete the XmlEventWriter::close method must be called. The XmlResults object can then be bound to a variable using XmlQueryContext::setVariableValue and used in queries.

Errors

The XmlResults::asEventWriter method may fail and throw XmlException , encapsulating one of the following non-zero errors:

INVALID_VALUE

The XmlResults object is not empty

Class

XmlResults

See Also

XmlResults Methods