looks easy and is easy. But now you come to the point where you think. Mhm it would be nice, if I could just read the builder code from an external file and generate the xml on the fly using this. For example you have to generate an xml configuration file and rather simplify this process using groovy and this has to be done more than once...

After a couple of hours googleing the best solution I came up with, was to provide your own binding to the builder, which simplified things quite a bit.