I am using the following code to dynamically generate xml
def testXML(){
render( contentType:"text/xml" ) {
book() {
author( name:'author')
}
}
}
The xml file is missing the xml header
<?xml version="1.0" encoding="UTF-8"?>
The generated xml looks as follows:
How can i add the xml version and encoding header? Thanks for the help!