new stream-based XML parser
Submitted by Allison (desrt)
Link to original bug (#731626)
Description
I started a while ago on a new stream-based XML parser. The main API is that you ask for "next token" one at a time and get back open-tag/close-tag/text/etc.
It's based on reading from a GInputStream and has a hybrid sync/non-blocking/async API that allows one to get "next token" quickly, until it would block, before issuing an async call.
Internally it's driven by GMarkupParser turned inside out (which was surprisingly easy to do).
I've also started writing a new and more flexible GSettings schema compiler based on it. The savings of not having to have gigantic 'start' and 'end' callbacks with a gigantic if/else/else/else mess in each is substantial.
Branch is here: https://git.gnome.org/browse/glib/log/?h=wip/new-parser