views:

30

answers:

2

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

+1  A: 

StringTemplate, FreeMarker

kadalamittai
Apparently both look good but I will need to have a close look whether any of these fit to my needs. My concern is: 1. Does it work with any XML data source? because I have fixed schema for data documents that can not be changed. 2. How rich the set of APIs is, In particular does it support IFs, Loops, XML DOM and XPath? While I am studying both engines, can you give me your thoughts about my concerns?
Leslie Norman
+1  A: 

How about XSLt? You may use JAXP to do the processing.

Adarsh R
I ma not much familiar with XSLT but what I got is, "XML-based language used for the transformation of XML documents into other XML documents" If this is true then it will not work in my case. If it is something else please help me understand
Leslie Norman
you can look @ this URL http://www.saxonica.com/documentation/using-xquery/api-query/embedding.html for more information.its a simpel XQuery Engine for your reference.
kadalamittai