The following code compiles and runs fine on java 1.4.2
Result result = new StreamResult(outFile);
Source source = new DOMSource(document);
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.setOutputProperty(OutputKeys.METHOD, "xml");
xformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
xformer.setOutputProperty(OutputKeys.VERSION, "1.0");
xformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
xformer.setOutputProperty(OutputKeys.INDENT, "yes");
xformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
xformer.transform(source, result);
But when I compile and run it on java 5.0 I get a
javax.xml.transform.TransformerException: java.io.FileNotFoundException:
in the last line of the code.
Can anyone help me out?
Many thanks