![]() | writing XML to a file with groovy |
|
01 May 2009, 12:52
Brian Oleksa (1 post) |
I can easily generate XML with groovy and output it to the groovy console. def writer = new StringWriter() But how do I write this to a new file called gps.xml..? |
|
19 Feb 2010, 15:45
John McKown (11 posts) |
The same way you’d write anything to a file in Java. Perhaps something like:
def fileOut=new PrintStream("gps.xml")
fileOut.println(writer.toString())
fileOut.close()
|
| You must be logged in to comment |

