Element Construction Set - HTML元素构造


Apache
跨平台
Java

软件简介

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);