I am using StreamingMarkupBuilder to produce XML and I need to have a tag. Unfortunately I get exception :
Caught: java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.lang.Class
any ideas how I can create such tag?
import groovy.xml.StreamingMarkupBuilder
import org.custommonkey.xmlunit.*
import groovy.xml.XmlUtil
def xml = new StreamingMarkupBuilder().bind{
'use'(name:'Name', type:'type', year:2006) {
desc('desc')
}
}
println xml.toString()