示例#1
0
文件: Driver.java 项目: blnz/palomar
 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
文件: Driver.java 项目: blnz/palomar
  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
文件: Driver.java 项目: blnz/palomar
 public void setLocale(java.util.Locale locale) {
   parser.setLocale(locale);
 }