Java HTML Builder (anti-template) library?

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.


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


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.