It would be useful to be able to put TagCreator into XHTML compliant mode. At the very least, this would ensure that all tags are closed. For example, I found that when attempting to parse the generated HTML with an XML parser (using itext to generate PDFs from the HTML), it would complain about unclosed tags. For example, I had to replace
img().withSrc("/img/hello.png")
with
rawHtml("<img src=\"/img/hello.png\"></img>")
In my imagined XHTML mode, the first code snippet would generate [X]HTML like this:
<img src="/img/hello.png"></img>
It would be useful to be able to put TagCreator into XHTML compliant mode. At the very least, this would ensure that all tags are closed. For example, I found that when attempting to parse the generated HTML with an XML parser (using itext to generate PDFs from the HTML), it would complain about unclosed tags. For example, I had to replace
img().withSrc("/img/hello.png")
withrawHtml("<img src=\"/img/hello.png\"></img>")
In my imagined XHTML mode, the first code snippet would generate [X]HTML like this:
<img src="/img/hello.png"></img>
Thanks !