pauldix/sax-machine — pull request #32 by gaffneyc (2012-06-04 04:47:14+00:00)
Title: Refactor SaxHandler for clarity

The overall goal was to make the code easier to grok while I was
tracking down the issue with elements having the wrong encoding.

* Tried to reduce the number of instances of respond_to? in the code by
pulling common uses of it out to methods.
* The parse stack is now composed of simple objects instead of it being
an array of arrays.
* Now using an identifier for an empty buffer instead of empty string.
* Cleaned up several variables that were not being used.
* Encapsulated stack so it's not being exposed as part of the API.
* #cdata_block is now an alias instead of delegating to characters.

This includes and depends on issue #31, sorry for any duplication.