Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-beta-6
-
None
-
None
Description
data = ['Rod': ['Misha':'a & b', 'Bowie':2], 'Eric': ['Poe':4, 'Doc':3]]
xml = new groovy.xml.MarkupBuilder()
people = xml.people(){
for(entry in data){
person(name: entry.key){
for (dog in entry.value)
}
}
}
produces:
<people>
<person name='Rod'>
<pet name='Bowie' age='2' />
<pet name='Misha' age='a & b' />
</person>
<person name='Eric'>
<pet name='Poe' age='4' />
<pet name='Doc' age='3' />
</person>
</people>
which is broken xml