Examples/src/main/java/org/openestate/io/examples/DaftIeWritingExample.java
@SuppressWarnings("Duplicates")
    protected static void write(DaftIeDocument doc, File file) {
        LOGGER.info("writing document with version " + doc.getDocumentVersion());
        try {
            doc.toXml(file, PRETTY_PRINT);
            LOGGER.info("> written to: " + file.getAbsolutePath());
        } catch (Exception ex) {
            LOGGER.error("Can't write document into a file!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            System.exit(1);
        }
    }
@SuppressWarnings("Duplicates")
    protected static void write(DaftIeDocument doc, File file) {
        LOGGER.info("writing document with version " + doc.getDocumentVersion());
        try {
            doc.toXml(file, PRETTY_PRINT);
            LOGGER.info("> written to: " + file.getAbsolutePath());
        } catch (Exception ex) {
            LOGGER.error("Can't write document into a file!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            System.exit(1);
        }
    }
@ SuppressWarnings ( "Duplicates" ) protected static void write ( DaftIeDocument doc , File file ) { LOGGER . info ( "writing document with version " + doc . getDocumentVersion ( ) ) ; try { doc . toXml ( file , PRETTY_PRINT ) ; LOGGER . info ( "> written to: " + file . getAbsolutePath ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't write document into a file!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } }
Write a {@link DaftIeDocument} into a {@link File}.

@param doc  the document to write
@param file the file, where the document is written to
Write a { @link DaftIeDocument } into a { @link File } .