I was trying to create the list initially in that case and then to xml with the following code
import groovy.sql.Sql; import java.sql.ResultSet; Sql sql = Sql.newInstance("jdbc:oracle:thin:@localhost:1521:XE","username", "password", "oracle.jdbc.driver.OracleDriver") def emptyList = [] sql.eachRow("select * FROM A") { row -> emptyList.add("${row}") } and the result which am getting is like [groovy.sql.GroovyResultSetExtension@5a632bc3, groovy.sql.GroovyResultSetExtension@5a632bc3]. How do I convert this to the actual result. Also am a doing the correct approach initially by including all the results into a empty list and then converting it to xml. Please suggest me if there is any better approach of converting the db results into xml. -- View this message in context: http://groovy.329449.n5.nabble.com/Convert-Oracle-Result-sets-to-xml-tp5734358p5734377.html Sent from the Groovy Dev mailing list archive at Nabble.com.