* If true, {@link XMLStreamWriter} will not receive {@link XMLStreamWriter#writeStartDocument()}
* nor {@link XMLStreamWriter#writeEndDocument()}. This is desirable behavior when
* you are writing the contents of a buffer into a bigger document.
*/
public final void writeToXMLStreamWriter(XMLStreamWriter writer, boolean writeAsFragment) throws XMLStreamException {
StreamWriterBufferProcessor p = new StreamWriterBufferProcessor(this,writeAsFragment);
p.process(writer);
}