Reputation: 6138
Can somebody suggest me a template engine (preferably written in Java) that could generate any text that I like from given XML input?
Upvotes: 3
Views: 1511
Reputation: 2446
You can use XSLT, it is not restricted to generating only XML output. It is restricted to XML input. Use the xsl:output tag do define the type of output you will be generating.
E.g. to generate text output
<xsl:output method="text" encoding="UTF-8"/>
To generate XML output with indentation
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
Upvotes: 1