serializer.getSerializerObject().setOutputFormat(props.getProperties());
((ParserAdapter)handler).setContentHandler(serializer.getSerializerObject());
}
else if ( format.getMethod().equalsIgnoreCase( "text" ) )
{
FormatterToText serializer = new FormatterToText(writer);
((ParserAdapter)handler).setContentHandler(serializer.getSerializerObject());
}
else
{
handler = null;
}
}
if(null == handler)
{
String method = format.getMethod();
org.apache.xml.serialize.SerializerFactory factory = org.apache.xml.serialize.SerializerFactory.getSerializerFactory(method);
org.apache.xml.serialize.Serializer serializer = factory.makeSerializer(writer, format);
handler = serializer.asDocumentHandler();
}
return handler;
}