Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.0-beta-10
-
None
Description
writer = new java.io.StringWriter()
builder = new groovy.xml.MarkupBuilder(writer)
customers = builder.customers() {
acustomer = builder.cusomer(name:"John")
builder.setCurrent(acustomer)
builder.order()
}
println writer.toString()
/* the output is
<customers>
<customer name='John' />
<order />
</customers>
*/
But if I let builder be NodeBuilder. e.g.
builder = new groovy.util.NodeBuilder()
the LOGIC of customers is like
<customers>
<customer name='John' >
<order/>
</customer>
</customers>