final Serializer serializer = context.getBroker().getSerializer();
serializer.reset();
serializer.setProperties(DEFAULT_PROPERTIES);
serializer.setSAXHandlers(handler, handler);
serializer.toSAX(doc);
}
} catch (ParserConfigurationException e) {
reportError(output, "Parser exception while saving file " + targetFile.getAbsolutePath() + ": " + e.getMessage());
} catch (SAXException e) {
reportError(output, "SAX exception while saving file " + targetFile.getAbsolutePath() + ": " + e.getMessage());