views:

238

answers:

3

I am looking for a template engine with iteration, bifurcation, markup alike and that takes a string for template input rather a file.

That's because I have my own way to supply the input template, and is not for a file.

Also it's have to be opensource.

Do you know something like this?

+1  A: 

Check out velocity . Even if at first look at seems to be file-based, it can be used with templates from any source, even strings.

PeterMmm
+4  A: 

I've recently used StringTemplate and it seems pretty good, open source, and requires a Reader as template input, so providing a StringReader isn't difficult.

bruno conde
+2  A: 

Try FreeMarker. It is flexible and has good documentation. I have used it in the past and had no problems.

dogbane