Interface SAXEventBuffer

public interface SAXEventBuffer

This interface is implemented by classes that can provide XML content by emitting SAX events.

Applications that use XML at their interfaces can sometimes not avoid using XML like data structures for internal data representation. Holding this data as XML is not very time efficient, because it must be parsed in order to be processed (although parsing time for XML is often overestimated).

Holding the data in either W3C DOM or JDOM representations is not very memory efficient. Depending on the implementation, DOM representations use a factor of 6 to 10 compared with the file space of the same description.

A SAX event buffer is a compromise. It stores the events generated by a SAX parser using as little space as possible while providing the data very quickly to a content Handler.

Method Summary
 void emit(org.xml.sax.ContentHandler contentHandler)
          Emits the events to the given ContentHandler.

Method Detail


public void emit(org.xml.sax.ContentHandler contentHandler)
          throws org.xml.sax.SAXException
Emits the events to the given ContentHandler.

contentHandler - the content handler that is to receive the events.
org.xml.sax.SAXException - any SAX exception, possibly wrapping another exception.