in reply to Re^3: Incremental XML parsing
in thread Incremental XML parsing

Because it explicitly says that the non-blocking parser should not be used with XML::Twig and is untested. Yes, the author chose to include the only mention of the non-blocking parser in the documentation for an unrelated option, but the docs in general are quite confusing. As it stands, XML::LibXML::Reader has similar functionality to XML::Twig, but is much, much faster. But neither appear to be able to parse XML incrementally. Note this means not only to not produce the entire DOM at once, but also to be able to consume the input document in pieces, such as feeding data as it arrives over the wire.

Replies are listed 'Best First'.
Re^5: Incremental XML parsing
by runrig (Abbot) on Feb 04, 2012 at 21:04 UTC
    In the OP, I see only a requirement to parse large documents, in which case Twig (or XML::Rules) would likely be fine.
      OP here. I do consider incremental parsing to include incremental feeding of data to the parser. That was why I mentioned XML::SAX::Expat::Incremental.
        I still don't see why "large document" == "need incremental parser". I can see why you would need a stream parser (e.g. *::SAX XML::Twig XML::Rules). Non-incremental stream parsers parse large documents just fine without parsing the entire document into memory.