[Haskell-cafe] XML parser recommendation?

Yitzchak Gale gale at sefer.org
Tue Oct 23 07:45:31 EDT 2007

Malcolm Wallace wrote:
> HaXml now uses the polyparse library, and you can choose whether you
> want well-formedness checking with the original strict parser, or lazy
> space-efficient on-demand parsing.  Initial performance results show
> that parsing XML lazily is always better than 2x as fast, and 1/2x peak
> memory usage of strict parsing.

Hey, that's great news!

> In some usage patterns, it can reduce
> the cost of processing from linear in the size of the document, to a
> constant (the distance into the document to find a particular element).

Oh oh - does that mean that Ketil's original case
(an element containing a large quantity of CDATA) could
still be a problem?

Parsing the CDATA ought to be possible to delay
if needed.


More information about the Haskell-Cafe mailing list