Code example for DefaultHandler

0
  private static DefaultHandler getHandler(
      DefaultHandler handler,
      DefaultHandler errorHandler,
      EntityResolver entityResolver)
  { 
    DefaultHandler hdlr = handler != null ? handler : new DefaultHandler();
    return new AggregateHandler(hdlr, errorHandler, entityResolver);
  } 
 
  /** 
   * Aggregate DefaultHandler which delegates to other handlers. 
   */ 
  private static class AggregateHandler 
    extends DefaultHandler
  { 
    private DefaultHandler handler;
    private DefaultHandler errorHandler;
    private org.xml.sax.EntityResolver entityResolver;
 
    /** 
     * Constructs a new instance.