DOMSource source = new DOMSource(testDoc);
// PrintStream will be responsible for writing
// the text data to the file
PrintStream ps = new PrintStream(file);
StreamResult result = new StreamResult(ps);
// Once again we are using a factory of some sort,
// this time for getting a Transformer instance,
// which we use to output the XML
TransformerFactory transformerFactory = TransformerFactory