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.
-
ClassDescriptionAuto-Generated builder from schema: xhtml1-transitional.xsdMost of the XHTML tags and attributes are available as methods.HtmlBuilder<T>Most of the XHTML tags and attributes are available as methods.Writes HTML using an
HtmlBuilder
by callingHtmlWriter.write(Writer)
.A strategy to indent or in other words pretty print the markup.Indicates the current position (cursor) of where whitespace is to be applied.Fluent styled markup builder that writes to aWriter
.Policy for how tags should be closed.The methods in this class will be merged withMarkupWriter
in 0.3.0.XML Utils.Wrap builders for deferred writing.A simple indenter that takes a String for before and after on the opening and closing tag.