Element Construction SetHTML元素构造
ECS (Element Construction Set) 是一个用 Java 对象来生成 HTML 文档的工具包。
示例代码:
Html html = new Html()
.addElement(new Head()
.addElement(new Title("Demo")))
.addElement(new Body()
.addElement(new H1("Demo Header"))
.addElement(new H3("Sub Header:"))
.addElement(new Font().setSize("+1")
.setColor(HtmlColor.WHITE)
.setFace("Times")
.addElement("The big dog & the little cat chased each other.")));
out.println(html.toString());
// or write to the outputstream directly
output(out);评论
