public static void writeDocToFile(Document doc, File dest) throws IOException {
		XMLOutputter outputter = new XMLOutputter();
		try (FileWriter fw = new FileWriter(dest)) {
			outputter.output(doc, fw);
		}
	}
Writes a JDOM XML {@link Document} to a {@link File}.

@param doc JDOM XML {@link Document} to write.
@param dest {@link File} to write to.
@throws IOException if error when writing file.
Ghidra/Framework/Generic/src/main/java/ghidra/util/xml/XmlUtilities.java