Groovy comes built-in with a cool feature for parsing XML, and easily “objectifying” it.
Its a one-liner:
def document = new XmlSlurper().parseText(xml); // Convert the XML into an Object Model … 188 more words
I have modified the DictParser ,mentioned in previous blog, to handle object parsing. Previous version of DictParser can only handle basic data type, whereas in this version, user can pass a dict of objects for the DictParser to identify and it will replace those variables marked with ‘@’, treating them as objects. 127 more words