Subject: | Allow push parser to be used in conjuction with pull or sax parser |
If parsing a large xml document or endless xml stream over the network,
the pull parser (XML::LibXML::Reader) can't be used with an event loop
because it will block. The push parser (parse_chunk) seems like the
ideal method to push the data to the parser as it arrives, but it
requires the user to manually identify well-balanced chunks (by passing
the terminate flag or calling finish_push). I am requesting that either
the API be extended to make this more convenient for the user to use the
push parser to add data and the pull parser to consume it, or add some
documentation to accomplish something similar. The end goal is to allow
non-blocking parsing of large documents or xml streams with an event loop.