Programmatic HTMLDocument generation using Java

前端 未结 9 1915
孤独总比滥情好
孤独总比滥情好 2021-02-14 03:34

Does anyone know how to generate an HTMLDocument object programmatically in Java without resorting to generating a String externally and then using HTMLEditorKit#read to parse i

9条回答
  •  渐次进展
    2021-02-14 04:17

    You may want to build some Element object with a render() method, and then assemble them in a tree structure; with a visit algorhytm you may then proceed to set the values and then render the whole thing.

    PS: have you considered some templating engine like freemarker?

提交回复
热议问题