I am reading an XML file with a schema based on a Domain Class.
Here is a simple example for illustration (my current situation concerns a lot of fields from a lot o
Actually, you can give directly the list of attributes to your domain class constructor with attributes().
def players = new XmlSlurper().parse(xmlFile) players.player.each() {p -> new Player(p.attributes()).save() }