I am using transformer to transform one type to another type. Code for this is
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
transformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://ift.tt/1fh1NGB", "2");//Getting error here
DOMSource source = new DOMSource(doc);
StreamResult result = new StreamResult(new FileWriter(outputFilePath));
transformer.transform(source, result);
The Stack trace of the exception is java.lang.IllegalArgumentException at oracle.xml.jaxp.JXTransformer.setOutputProperty(JXTransformer.java:798)
I am using Jdeveloper and its java version 1.6 added jars jdom1.0 and xercesimpl.jar
Will any one help on this.
No comments:
Post a Comment