giovedì 8 ottobre 2009

This month the last article in the 'Groovy tools for Java developers' series was published on MokaByte. It was related to Groovy testing, and can be found here. This article is based on a talk I made at the JUG Milano some months ago, that can be found on SlideShare.

One quite common thing to do when working with XML is to manipulate nodes: remove or rename attributes, changing values, remove or append nodes, and so on.With Groovy's XmlParser this is quite easy, as explained in the official documentation.Here are some more complex examples.Suppose you want to set an attribute value, or to add the attribute if it doesn't exist. You can use this code: