[Haskell-beginners] Laziness and XML parsing
Michael Snoyman
michael at snoyman.com
Tue Nov 8 15:01:07 CET 2011
Here's a blog post on the package:
http://www.yesodweb.com/blog/2011/10/xml-enumerator . It doesn't cover
the streaming interface, but it might give you a good overview of the
package in general. I'm not sure what you mean by "it doesn't run,"
but you'll need at least a basic understanding of enumerators to get
off the ground.
On Tue, Nov 8, 2011 at 5:38 AM, Sean Hess <seanhess at gmail.com> wrote:
> I cannot seem to find a working example of xml-enumerator. It doesn't run:
> the names seem to have changed for some things, and I'm too much of a
> beginner to figure it out easily.
> http://hackage.haskell.org/packages/archive/xml-enumerator/0.4.3.1/doc/html/Text-XML-Stream-Parse.html#t:ParseSettings
>
> On Nov 7, 2011, at 7:59 PM, Felipe Almeida Lessa wrote:
>
> On Tue, Nov 8, 2011 at 12:45 AM, Sean Hess <seanhess at gmail.com> wrote:
>
> I want to parse a large xml file (2GB), without putting the whole thing into
>
> memory. It's pretty simple with a sax parser in most languages, you just
>
> stream bytes to the sax parser, and wait for sax events.
>
> I recommend you taking a look at xml-enumerator [1] and
> libxml-enumerator [2]. They are the SAX parsers you know from the
> imperative world but much easier to write =). In particular, you
> don't need to rely on lazyness.
>
> Cheers,
>
> [1] http://hackage.haskell.org/package/xml-enumerator
> [2] http://hackage.haskell.org/package/libxml-enumerator
>
> --
> Felipe.
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
More information about the Beginners
mailing list