I have some code like:
XMLInputFactory xif = XMLInputFactory.newInstance()
TransformerFactory tf = TransformerFactory.newInstance("org.apache.xalan.processor.TransformerFactoryImpl", null)
Transformer t = tf.newTransformer()
DOMResult result = new DOMResult()
t.transform(new StAXSource(reader), result)
Which produces the following error:
Caught: javax.xml.transform.TransformerException: Can't transform a Source of type javax.xml.transform.stax.StAXSource
The reader object is of type com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl