saxon v0.1.0 Saxon.Sax
An overly simplified SAX parser, aiming at reducing memory footprint when dealing with large text nodes.
Supports only the following events:
:start_document (state)
:end_document (state, conn)
:start_element (element_name, attributes, state)
:end_element (element_name, state)
:characters (chunk, state)
Note that the :ignorableWhitespace
event in xmerl or erlsom will be treated as :characters
.
Even if there is only one piece of text in the element, the event :characters
can be triggered multiple times,
each time feeding a HTML entity decoded chunk to the event handler.
The sizes of the chunks can diverse hugely, so the handler should not make decision based on the chunk size.
Link to this section Summary
Link to this section Functions
Link to this function
start(conn, reducer, opts \\ %{})