try {
out = exportOutput;
if (zipOutput) {
out = new GZIPOutputStream(out);
}
wrt = new IndentingXMLStreamWriter(ofactory.createXMLStreamWriter(out, "UTF-8"));
//wrt = ofactory.createXMLStreamWriter(out, "UTF-8");
} catch (XMLStreamException e) {
LOG.error("Failed to create the XML stream writer to output the export file to.", e);
return;
}