Core/src/main/java/org/openestate/io/core/XmlUtils.java
public static void write(Document doc, File file, boolean prettyPrint) throws TransformerException, IOException {
        try (OutputStream output = new FileOutputStream(file)) {
            XmlUtils.write(doc, output, prettyPrint);
        }
    }
public static void write(Document doc, File file, boolean prettyPrint) throws TransformerException, IOException {
        try (OutputStream output = new FileOutputStream(file)) {
            XmlUtils.write(doc, output, prettyPrint);
        }
    }
Write a {@link Document} to a {@link File}.

@param doc         the document to write
@param file        the file, where the document 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