[Haskell-cafe] XML parser recommendation?
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Tue Oct 23 08:40:47 EDT 2007
"Yitzchak Gale" <gale at sefer.org> wrote:
> > 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?
Not necessarily. If the CDATA is not actually needed, it is possible
that it would simply be discarded automatically by the lazy demand
pattern. That does depend very much on how the consumer is written
however.
HaXml will still require a rather large amount of space to _lex_ the 25k
line text element into a single token of course (I estimate no bigger
than about 3Mb though). I have been considering moving the lexer to use
ByteString instead of String, which would neatly solve that problem too.
Regards,
Malcolm
More information about the Haskell-Cafe
mailing list