// setup filter chain
XMLDocumentFilter[] filters = {
new Purifier(), // [1] standard neko purifications (tag balancing, etc)
new CallbackElementRemover( rewriter ), // [2] accept / reject tags based on advice from rewriter
writer != null ? new org.cyberneko.html.filters.Writer( writer, null ) : new DefaultFilter() // [3] propagate results to specified writer (or do nothing -- Default -- when writer is null)
};
String filtersPropName = "http://cyberneko.org/html/properties/filters";
try