How to get a non-XML output using JDOM XSLTransformer?
Posted
by Neil McF
on Stack Overflow
See other posts from Stack Overflow
or by Neil McF
Published on 2010-04-13T13:44:21Z
Indexed on
2010/04/13
14:43 UTC
Read the original article
Hit count: 357
Hello,
I have an XML file which I'd like to parse into a non-XML (text) file based on a XLST file. The code in both seem correct, and it works when testing manually, but I'm having a problem doing this programatically.
I'm using JDOM's XSLTransformer class to apply the XSLT to the XML and it returns it in the format of a JDOM Document. The problem here is that I can't seem to access anything in the Document as it is not a proper XML file and I get a "java.lang.IllegalStateException: Root element not set" error.
Is there a better way within Java to obtain a non-XML file as a result of XSLT?
© Stack Overflow or respective owner