It seems to me that your XML builder is trying to reference some String variable in the environment. Since groovy builder intercept missing method calls, if they find a reference they will try to apply to it. The following code can reproduce your error:
def id = ""
new groovy.xml.MarkupBuilder().xml {
id "90"
}
And the following is fine:
def ids = ""
new groovy.xml.MarkupBuilder().xml {
id "90"
}
Renaming your id
variable should do the trick
Update:
An alternative way to use a tag with same name as a variable in the scope is with a (ugly) GString:
def id = ""
new groovy.xml.MarkupBuilder().xml {
"${'id'}" "90"
}