public void toXml(File xmlFile, boolean prettyPrint) throws TransformerException, IOException {
        if (this.isTextWrittenAsCDATA()) {
            XmlUtils.replaceTextWithCData(this.getDocument());
        }
        prepareDocumentBeforeWritingToXml(this.getDocument());
        XmlUtils.write(this.getDocument(), xmlFile, prettyPrint);
    }
public void toXml(File xmlFile, boolean prettyPrint) throws TransformerException, IOException {
        if (this.isTextWrittenAsCDATA()) {
            XmlUtils.replaceTextWithCData(this.getDocument());
        }
        prepareDocumentBeforeWritingToXml(this.getDocument());
        XmlUtils.write(this.getDocument(), xmlFile, prettyPrint);
    }
public void toXml ( File xmlFile , boolean prettyPrint ) throws TransformerException , IOException { if ( this . isTextWrittenAsCDATA ( ) ) { XmlUtils . replaceTextWithCData ( this . getDocument ( ) ) ; } prepareDocumentBeforeWritingToXml ( this . getDocument ( ) ) ; XmlUtils . write ( this . getDocument ( ) , xmlFile , prettyPrint ) ; }
Generate XML for the contained {@link Document}.

@param xmlFile     the file, 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 } .