XmlEventReaderToWriter

API Ref

#include <DbXml.hpp>

class DbXml::XmlEventReaderToWriter { public: XmlEventReaderToWriter(XmlEventReader &reader, XmlEventWriter &writer, bool ownsReader = true) ... };


Description: XmlEventReaderToWriter

The XmlEventReaderToWriter class enables events read from an XmlEventReader to be written directly to an XmlEventWriter. This is useful for processing XML document content, efficient copying, and other application integration tasks. Use XmlEventReaderToWriter::start to begin processing.


Description: XmlEventReaderToWriter(XmlEventReader &reader, XmlEventWriter &writer, bool ownsReader = true)

The method constructs an object from the reader and writer that will pipe events from the reader directly to the writer.

Parameters

reader
An XmlEventReader object from which events will be read. To create the reader, use one of XmlDocument::getContentAsEventReader, XmlValue::asEventReader, or implement an application-defined class derived from XmlEventReader.
writer
An XmlEventWriter object to which events will be written. When all events are processed, XmlEventWriter::close is called on the object. To create the writer, use one of XmlContainer::putDocumentAsEventWriter, or implement an application-defined class derived from XmlEventWriter.
ownsReader
If true (the default), XmlEventReader::close will be called when all events have been processed; otherwise, the reader is left alone upon completion.
This object is not thread-safe, and can only be safely used by one thread at a time in an application.

APIRef

Copyright (c) 1996,2007 Oracle. All rights reserved.