views:

114

answers:

2

I'm looking for an HTML object model in Java, capable of parsing HTML (not required) and containing all HTML elements (and CSS as well) in an elegant object model.

I'm looking for a pure java version of the Groovy's HTML builder. (I have no luck on google with this request.)

I want to be able to perform stuff like:

HTML html = new HTML();
Body body = html.body();

Table table body.addTable(myCssStyle);
Row row = table.addRow("a", "b", "c").withCss(cssRowStyle);

and so on...

+1  A: 

Just an idea: you could take a look at the source code of xhtmlrenderer project. https://xhtmlrenderer.dev.java.net/

It's not plain HTML (it's XHTML), but may be a good starting point, don't you think?

Kico Lobo
Well, this is an interesting project, but it's not really what I need.
Guillaume
+2  A: 

Jakarta ECS might be able to do what you want.

Mark
thanks a lot, this is exactly what I was looking for !
Guillaume
I wish I could +10 for this. That is a cool little project. Especially with the prospects for using it under Clojure which would be really cool!
JUST MY correct OPINION