It's very wonderful and extremely easy to use groovy.xml.XmlParser to flatten an XML document into a Grails compatible Map:
def Map xmlToMap(String xml) {
def root = new XmlParser().parseText(xml)
def map = [:]
root.depthFirst().each { n ->
if(n.value.size == 1) {
def key = n.name
def p = n.parent
while(p.parent != null) {
key = "${p.name}.${key}"
p = p.parent
}
map[key] = n.value[0]
}
}
return map
}