When using Groovy MarkupBuilder, I have places where I need to output text into the document, or call a function which outputs text into the document. Currently, I'm using the undefined tag "text" to do the output. Is there a better way to write this code?
li{
text("${type.getAlias()} blah blah ")
function1(type.getXYZ())
if (type instanceof Class1) {
text(" implements ")
ft.getList().each{
if (it == '') return
text(it)
if (!function2(type, it)) text(", ")
}
}
}