Example #1
0
 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;
 }
Example #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();
    }
  }
Example #3
0
 public void endDocument() throws SAXException {
   flushData();
   documentHandler.endDocument();
 }
Example #4
0
 public void processingInstruction(ProcessingInstructionEvent event) throws SAXException {
   flushData();
   this.locatedEvent = event;
   documentHandler.processingInstruction(event.getName(), event.getInstruction());
   this.locatedEvent = null;
 }
Example #5
0
 public void endElement(EndElementEvent event) throws SAXException {
   flushData();
   documentHandler.endElement(event.getName());
 }
Example #6
0
 private final void flushData() throws SAXException {
   if (dataBufUsed > 0) {
     documentHandler.characters(dataBuf, 0, dataBufUsed);
     dataBufUsed = 0;
   }
 }
Example #7
0
 public void startDocument() throws SAXException {
   documentHandler.startDocument();
 }