javax.xml.transform.TransformerException: Unknown error in XPath.
Hi
I am getting
javax.xml.transform.TransformerException: Unknown error in XPath.
Caused by: java.lang.ClassCastException
from the snippet of code below.
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer(new StreamSource(xslFile));
String outputString = "";
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
//_cat.info("Before Transform");
**** transformer.transform( new StreamSource(xmlFile), new StreamResult(outputStream));
//_cat.info("After Transform");
outputString = outputStream.toString();
printWriter = new PrintWriter(new FileWriter(new File(outFile)));
printWriter.write(outputString);
printWriter.flush();
I am getting the exception in the starred(****) line above.
Please guide me as to what could be the issue.