Release 2.1
· One min read
HtmlFlow version 2.1 is updated to release 1.0.10 of com.github.xmlet.HtmlApi and introduces a couple of new features:
- A new
render()method that produces aStringrather than writing to aPrintStream. This uses aStringBuilderinternally and offers better performance than the previouswrite()approach. HtmlView<T>now extendsAbstractElement<HtmlView<T>, Element>and is compatible withElement, allowing it to be a parent element ofHtml. However, it does not supportaccept(ElementVisitor visitor)orcloneElem().- The
Htmlroot field definition inHtmlViewis updated to include the generic parent asHtml<HtmlView>and add it as a child of thatHtmlView. - A new static factory method
html()is introduced to start building anHtmlView. - These features, combined with the existing
º()method, make it possible to build a view in a single pass, reducing the need for auxiliary variables to capture intermediate elements. All views in theREADME.mdexamples are now built using static field assignments. More usage examples can be found in HtmlTables and HtmlLists.