SMAXProto


Project Page JavaDoc

Thanks for your interest in SMAXProto.

After using SAX parsing for just few times, it becomes clear that often the custom parser you write is only interested in a subset, and often a small subset, of the entire document. Often, much of the content handler is determining where you are in the tree, and ignore stuff you don't want. This project builds a prototype that attempts to simplify filtering out what you don't want to handle, thus simplifying the handler, and improving performance.

THIS IS A PROTOTYPE

A prototype should

Hopefully this prototype fulfills all of these tasks

SMAX follows the basic flavor of SAX. There are 3 key differences (at this point).

  1. startDocument and startElement return an enum value of type NextParserAction
    Enum Values are:
    1. ProcessChildren
    2. ProcessChildElements
    3. ProcessChildTextNodes
    4. ProcessAttributes
    5. SkipChildElements
    6. SkipChildTextNodes
    7. SkipAttributes
    8. SkipChildren
    9. Terminate
    returning one of these values determines what further processing occurs
  2. startElement doesn't provide attributes
  3. SMAX's ContentHandler provides an attributes method to implement to get attributes