..." } public String doMiddleStuff(blahblah){ pri" /> ...
" } public String doMiddleStuff(blahblah){ pri" /> ...
" } public String doMiddleStuff(blahblah){ pri"/>

Only print opening in Groovy MarkupBuilder

92 Views Asked by At

I have code like the following

public String printHeader(){
    println "<html><head>...</head><body><table>"
}

public String doMiddleStuff(blahblah){
    println <tr><td>etcetc</td></tr>
}

public String printFooter(){
    println "</table></body></html>"
}

I want to use Groovy's MarkupBuilder, but when you do

new MarkupBuilder(writer).html{
...
}

It both opens and closes my tags. Is there a way I can split this stuff up, while still taking advantage of MarkupBuilder?

0

There are 0 best solutions below