Пример #1
0
 public Driver() {
   org.xml.sax.HandlerBase handler = new org.xml.sax.HandlerBase();
   this.documentHandler = handler;
   this.dtdHandler = handler;
   this.errorHandler = handler;
   this.entityResolver = handler;
   parser.setApplication(this);
   parser.setEntityManager(this);
 }
Пример #2
0
  public void parse(org.xml.sax.InputSource in) throws SAXException, IOException {

    documentHandler.setDocumentLocator(this);
    try {
      parser.parseDocument(openInputSource(in));
    } catch (WrapperException e) {
      throw e.getWrapped();
    } catch (NotWellFormedException e) {
      errorHandler.fatalError(
          new org.xml.sax.SAXParseException(
              e.getMessageWithoutLocation(),
              null,
              e.getEntityLocation(),
              e.getLineNumber(),
              e.getColumnNumber()));
    } catch (ApplicationException e) {
      throw (SAXException) e.getException();
    }
  }
Пример #3
0
 public void setLocale(java.util.Locale locale) {
   parser.setLocale(locale);
 }