// Implementation methods
//-------------------------------------------------------------------------
protected XMLOutput createXMLOutput() throws Exception {
OutputFormat format = null;
if (prettyPrint) {
format = OutputFormat.createPrettyPrint();
}
else {
format = new OutputFormat();
}
if ( encoding != null ) {
format.setEncoding( encoding );
}
if ( omitXmlDeclaration ) {
format.setSuppressDeclaration(true);
}
OutputStream out = new FileOutputStream(name);
boolean isHtml = outputMode != null && outputMode.equalsIgnoreCase( "html" );