Showing posts with label render xml. Show all posts
Showing posts with label render xml. Show all posts

Saturday, September 27, 2014

GRAILS Render Or Display XML In Browser


import groovy.xml.XmlUtil
....
def xmlString = "YOUR XML STRING";
def xmlAsText = XmlUtil.serialize(xmlString)
render(text: xmlAsText, encoding:"UTF-8", contentType:"text/xml")