I am fairly new to Freemarker and to template engine in general.
Basicly I want to be able to generate at least two XML files (from two templates) with the same Java "main class". For exemple:
- myTemplate1.ftl contain : <res>${res}</res><Administration creationTime="${creationTime}">
and
- myTemplate2.ftl contain : <Administration creationTime="${creationTime}"><resutlt>${result}</result>
How can I write one class "Main" to process this without being specific (I do not want to write line per line, because then it would be pointless to create an engine)
Can you please help me understand how it work through an example if possible ?
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am fairly new to Freemarker and to template engine in general.
Basicly I want to be able to generate at least two XML files (from two templates) with the same Java "main class".
For exemple:
- myTemplate1.ftl contain : <res>${res}</res><Administration creationTime="${creationTime}">
and
- myTemplate2.ftl contain : <Administration creationTime="${creationTime}"><resutlt>${result}</result>
How can I write one class "Main" to process this without being specific (I do not want to write line per line, because then it would be pointless to create an engine)
Can you please help me understand how it work through an example if possible ?
Regards
Re-asked here: http://stackoverflow.com/questions/44027783/freemarker-generate-xml-from-flt-template-and-java-methods