Update XML-Groovy.xml.groovy


I am trying to update XML-Groovy.xml.groovy to fit my needs. The row separator should be the table name instead of <row>.

I changed line 73 from

printRow(0, "row", values)


printRow(0, TABLE, values)

but this results in <TableName: table>. I need just <TableName>, where "TableName" is the name of the table.

I found a way to achieve my goal:

String tableName = TABLE;
Integer len = tableName.length();
printRow(0, tableName.substring(0, len - 7), values)

This solution does not look very elegant. Is there a better way to achieve the same result?

Comment actions Permalink

Hello Christoph!

TABLE.getName() // table name
TABLE.getParent().getName() // schema name

Example can be found in SQL-Insert-Statements.sql.groovy

Comment actions Permalink

Liudmila, that's it! Many thanks!


Please sign in to leave a comment.