Package com.googlecode.jatl


package com.googlecode.jatl
For quickstart documentation: http://jatl.googlecode.com/ and MarkupBuilder.

Example

StringWriter sw = new StringWriter();
new Html(sw) {{
        div().title("first");
                span().id("hello").end();
                div().title("second");
                        text("Second");
                        start("custom1").attr("data", "value").end();
                        start("custom2").text("hello").end();
                end();
        end();
}};
String result = sw.getBuffer().toString();
String expected = "\n" + 
                "<div title=\"first\">\n" + 
                "       <span id=\"hello\"/>\n" + 
                "       <div title=\"second\">Second\n" + 
                "               <custom1 data=\"value\"/>\n" + 
                "               <custom2>hello\n" + 
                "               </custom2>\n" + 
                "       </div>\n" + 
                "</div>";
assertEquals(expected, result);

See MarkupBuilder for creating your own markup builders.