Showing posts with label Groovy. Show all posts
Showing posts with label Groovy. Show all posts

Monday, 7 February 2011

Read from a database and write into an xml using Groovy

You may come across a use-case where you need to read some data from a database and generate an xml report or file that needs to be sent across to be processed by some other system.

Doing this using a java program could be relatively overwhelming; with Groovy you can do this in a matter of minutes!

Let's take a look at how you can convert data returned from a sql query into an xml file.