* xml File to write
* @throws IOException
*/
public static void writeXmlFile(Document domDoc, File outFile) throws IOException {
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(outFile));
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding("UTF-8");
XMLWriter xmlFileWriter = new XMLWriter(bos, format);
xmlFileWriter.write(domDoc);
xmlFileWriter.flush();
xmlFileWriter.close();
}