Closed ejektaflex closed 5 years ago
For reference, I am using this:
package util
import org.redundent.kotlin.xml.Node
class XmlComment(text: String): Node(text) {
override fun render(builder: Appendable, indent: String, printOptions: PrintOptions) {
builder.append("<!-- $nodeName -->")
}
}
You can adapt this or do something similar if you'd like!
Thanks @ejektaflex This has been added in version 1.5.1 which is available now
Currently, I don't see a way of adding comments via the DSL, and it seems quite hard to do because nodes need a name, and comments are inherently unnamed (Unless you could their contained text). Adding support for comments in generated XML would be greatly appreciated!