public void toXml(OutputStream output, boolean prettyPrint) throws TransformerException, IOException {
    """
	Generate XML for the contained {@link Document}.
	
	@param output      the output, where the XML code is written to
	@param prettyPrint if pretty printing is enabled for the generated XML code
	@throws TransformerException if XML transformation failed
	@throws IOException          if writing failed
    """
        if (this.isTextWrittenAsCDATA()) {
            XmlUtils.replaceTextWithCData(this.getDocument());
        }
        prepareDocumentBeforeWritingToXml(this.getDocument());
        XmlUtils.write(this.getDocument(), output, prettyPrint);
    }
public void toXml(OutputStream output, boolean prettyPrint) throws TransformerException, IOException {
        if (this.isTextWrittenAsCDATA()) {
            XmlUtils.replaceTextWithCData(this.getDocument());
        }
        prepareDocumentBeforeWritingToXml(this.getDocument());
        XmlUtils.write(this.getDocument(), output, prettyPrint);
    }
public void toXml ( OutputStream output , boolean prettyPrint ) throws TransformerException , IOException { if ( this . isTextWrittenAsCDATA ( ) ) { XmlUtils . replaceTextWithCData ( this . getDocument ( ) ) ; } prepareDocumentBeforeWritingToXml ( this . getDocument ( ) ) ; XmlUtils . write ( this . getDocument ( ) , output , prettyPrint ) ; }
Generate XML for the contained {@link Document}.

@param output      the output, where the XML code is written to
@param prettyPrint if pretty printing is enabled for the generated XML code
@throws TransformerException if XML transformation failed
@throws IOException          if writing failed
Generate XML for the contained { @link Document } .