示例#1
0
文件: Driver.java 项目: blnz/palomar
 public void startElement(StartElementEvent event) throws SAXException {
   flushData();
   this.event = event;
   this.locatedEvent = event;
   this.idAttributeIndex = UNKNOWN_INDEX;
   documentHandler.startElement(event.getName(), this);
   this.locatedEvent = null;
 }
示例#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 endDocument() throws SAXException {
   flushData();
   documentHandler.endDocument();
 }
示例#4
0
文件: Driver.java 项目: blnz/palomar
 public void processingInstruction(ProcessingInstructionEvent event) throws SAXException {
   flushData();
   this.locatedEvent = event;
   documentHandler.processingInstruction(event.getName(), event.getInstruction());
   this.locatedEvent = null;
 }
示例#5
0
文件: Driver.java 项目: blnz/palomar
 public void endElement(EndElementEvent event) throws SAXException {
   flushData();
   documentHandler.endElement(event.getName());
 }
示例#6
0
文件: Driver.java 项目: blnz/palomar
 private final void flushData() throws SAXException {
   if (dataBufUsed > 0) {
     documentHandler.characters(dataBuf, 0, dataBufUsed);
     dataBufUsed = 0;
   }
 }
示例#7
0
文件: Driver.java 项目: blnz/palomar
 public void startDocument() throws SAXException {
   documentHandler.startDocument();
 }