[erlang-questions] Reading large (1GB+) XML files.

Edwin Fine <>
Thu Jun 19 04:44:43 CEST 2008

I don't know xmerl eventp, but for such large XML files it may be prudent
performance-wise to interface to a fast 'C' SAX parser such as expat. The
ejabberd project has an Erlang driver written to use the expat parser. It's
also some pretty good code for a proven real-world system that one could
learn a lot from. You may be able to adapt the code (I think it's called
xml_stream.erl and the 'C' files under c_src) although if, as you write, you
have only been doing Erlang for a few weeks it may be a bit of a leap to get
into linked-in drivers.

Hope this helps.

On Wed, Jun 18, 2008 at 6:07 PM, Matt Harrison <> wrote:

> I have to extract information from some extremely large XML files, 6GB+
> as well. All signs point to xmerl_eventp but the documentation is non
> exactly fleshed out and as I've only been doing erlang for a few weeks I
> am really struggling.
> Did anyone go down the eventp route and did you find any documentation
> or can any provide a basic example of the callback module that is
> required.
> Any help so greatly appreciated...
> regards,
> Matt
> P.s. Great Pragmatic book Joe.
> _______________________________________________
> erlang-questions mailing list
> http://www.erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080618/28801595/attachment.html>

More information about the erlang-questions mailing list