Skip to content Skip to sidebar Skip to footer

Java Html Builder (anti-template) Library?

I'm always looking for a modern Java library that makes creating valid (X)HTML snippets easy. Yes you could use a templating language but there are times when you do not want to do

Solution 1:

I ended up writing my own library called Java Anti-template Language (JATL)

Solution 2:

Have you tried the Jakarta Element Construction Set (ECS) project?

It is not really a fluent API - reminds me more of StringBuilder than Mockito... But functionally I think it is what you're after.

Solution 3:

Your best bet is probably to use an XML library and render the output as HTML.

I.E. Dom4J defines a HtmlWriter class for HTML-specific XML output.

But you'd still have to create your own api on top of it to actually create the document.

Post a Comment for "Java Html Builder (anti-template) Library?"