Issue Details (XML | Word | Printable)

Key: GROOVY-775
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Paul King
Reporter: Wang Bin
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

MarkupBuilder works not the same as NodeBuilder

Created: 12/Mar/05 09:30 PM   Updated: 11/Oct/07 04:29 AM   Resolved: 11/Oct/07 04:29 AM
Return to search
Component/s: scriptom
Affects Version/s: 1.0-beta-10
Fix Version/s: 1.1-rc-1

Time Tracking:
Original Estimate: 2 hours
Original Estimate - 2 hours
Remaining Estimate: 2 hours
Remaining Estimate - 2 hours
Time Spent: Not Specified
Time Spent - Not Specified


 Description  « Hide

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>



Wang Bin added a comment - 14/Mar/05 12:33 AM

maybe the component of this bug is JDK. But I don't know how to change the component. Even I don't know whether it is possible to modify the component


Guillaume Laforge made changes - 05/Apr/05 04:14 PM
Field Original Value New Value
Fix Version/s 1.0-JSR-2 [ 11517 ]
Fix Version/s 1.0-JSR-1 [ 10964 ]
Guillaume Laforge made changes - 15/Jun/05 04:54 AM
Fix Version/s 1.0-JSR-2 [ 11517 ]
Fix Version/s 1.0-JSR-3 [ 11518 ]
Guillaume Laforge made changes - 05/Aug/05 07:01 AM
Fix Version/s 1.0-JSR-3 [ 11518 ]
Fix Version/s 1.0-JSR-4 [ 11905 ]
Guillaume Laforge made changes - 22/Nov/05 04:53 AM
Fix Version/s 1.0-JSR-4 [ 11905 ]
Fix Version/s 1.0-JSR-5 [ 12102 ]
Guillaume Laforge made changes - 13/Feb/06 03:13 PM
Fix Version/s 1.0-RC-1 [ 12103 ]
Fix Version/s 1.0-JSR-5 [ 12102 ]
Guillaume Laforge made changes - 28/Jun/06 04:51 AM
Fix Version/s 1.0-RC-1 [ 12104 ]
Fix Version/s 1.0-JSR-6 [ 12103 ]
Guillaume Laforge made changes - 04/Dec/06 04:33 PM
Fix Version/s 1.0-RC-1 [ 12104 ]
Fix Version/s 1.0-final [ 10244 ]
Guillaume Laforge made changes - 20/Jan/07 03:21 PM
Fix Version/s 1.1 [ 10436 ]
Fix Version/s 1.0 [ 10244 ]
Guillaume Laforge made changes - 13/Feb/07 07:48 AM
Fix Version/s 1.1-beta-2 [ 10436 ]
Paul King added a comment - 11/Oct/07 04:29 AM

The current implementation of MarkupBuilder cannot support this style of using its API. The supported style of usage just nests the inner elements as needed.


Paul King made changes - 11/Oct/07 04:29 AM
Status Open [ 1 ] Closed [ 6 ]
Assignee Paul King [ paulk ]
Resolution Won't Fix [ 2 ]
Fix Version/s 1.1-rc-1 [ 13165 ]