[Haskell-cafe] Incremental XML parsing with namespaces?
lemming at henning-thielemann.de
Mon Jun 8 18:39:00 EDT 2009
John Millikin schrieb:
> On Mon, Jun 8, 2009 at 1:44 PM, Malcolm
> The interface you linked to doesn't seem to have a way to "resume"
> parsing. That is, I can't feed it chunks of text and have it generate
> a (ParserState, [Event]) tuple for each chunk. Perhaps this is
> possible in Haskell without explicit state management? I've tried to
> write a test application to listen on a socket and print events as the
> arrive, but with no luck.
> Manually re-parsing the events isn't attractive, because it would
> require writing at least part of the parser manually. I had hoped to
> re-use an existing XML parser, rather than writing a new one.
I think you could use the parser as it is and do the name parsing later.
Due to lazy evaluation both parsers would run in an interleaved way.
But you may also be interested in:
More information about the Haskell-Cafe