protected XMLReader installXMLFilter(XMLReader reader){
  XMLFilter filter=getXMLFilter();
  if (filter != null) {
    XMLFilter root=filter;
    while (true) {
      XMLReader parent=root.getParent();
      if (parent instanceof XMLFilter) {
        root=(XMLFilter)parent;
      }
 else {
        break;
      }
    }
    root.setParent(reader);
    return filter;
  }
  return reader;
}

protected XMLReader installXMLFilter ( XMLReader reader ) { XMLFilter filter = getXMLFilter ( ) ; if ( filter != null ) { XMLFilter root = filter ; while ( true ) { XMLReader parent = root . getParent ( ) ; if ( parent instanceof XMLFilter ) { root = ( XMLFilter ) parent ; } else { break ; } } root . setParent ( reader ) ; return filter ; } return reader ; }
installs any xmlfilter objects required to allow the sax event stream to be filtered and preprocessed before it gets to dom4j .
