use of org.grails.web.xml.PrettyPrintXMLStreamWriter in project grails-core by grails.
the class XML method render.
public void render(Writer out) throws ConverterException {
stream = new StreamingMarkupWriter(out, encoding);
writer = config.isPrettyPrint() ? new PrettyPrintXMLStreamWriter(stream) : new XMLStreamWriter(stream);
try {
isRendering = true;
writer.startDocument(encoding, "1.0");
writer.startNode(getElementName(target));
convertAnother(target);
writer.end();
finalizeRender(out);
} catch (Exception e) {
throw new ConverterException(e);
} finally {
isRendering = false;
}
}
Aggregations