XML template engine in Java?

Can someone suggest me a template engine (preferably written in Java) that could generate any text that I like from this XML input?

+3
source share
3 answers

StringTemplate, FreeMarker

+3
source

What about XSLt? You can use JAXP for processing.

+2
source

You can use XSLT, it is not limited to generating only XML output. is helimited to XML input. Use the xsl: output tag to determine the type of output you will generate.

eg. to generate text output

<xsl:output method="text" encoding="UTF-8"/>

To generate indented XML output

<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
+1
source

Source: https://habr.com/ru/post/1746302/


All Articles