Hi Roberto,<div><br></div><div><div>The main reason why I wrote erlsom was not memory footprint or speed, but the fact that I didn't understand the documentation of xmerl and I didn't like the output format. I thought (and still think) that it is a waste to translate a generic structure like xml to another generic structure (like a DOM tree or something similar). You must then extract your information from that new structure, while you could have done it in one pass. Both the SAX parser and the "data binder" mode that erlsom offers support this, in a way. </div>
<div><br></div><div>There has been a period when the erlsom SAX parser was a lot faster than xmerl, but nowadays xmerl also offers a SAX parser, and I think the difference in speed is small. Also, both erlsom and xmerl allow you to parse in a kind of streaming way, so neither forces you to load the whole XML document in memory, and both support working directly on binaries.</div>
<div><br></div><div>Note that, when you are looking at the performance of the parser you should also consider the effort that is required to get the information that you actually want from the output of the parser. If you use the erlsom "data mapper" mode, you will get nice records that are easy to access. If you use the SAX mode of erlsom or xmerl, you can take the information that you want out of the stream as you go along - actually a very nice model, I think.</div>
<div><br></div><div>By the way, please note that the best place to get erlsom nowadays is github, not sourceforge. The latest version is in <a href="https://github.com/willemdj/erlsom">https://github.com/willemdj/erlsom</a></div>
<div><br></div><div>Regards,</div><div>Willem</div><div><br></div><br><div class="gmail_quote">On Fri, Mar 23, 2012 at 4:22 PM, Roberto Ostinelli <span dir="ltr"><<a href="mailto:roberto@widetag.com">roberto@widetag.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear list,<br><br>does someone have recent considerations on xml parsers in terms of memory footprint, parsing speed and stability?<br>
<br>The ones I'm aware of are xmerl, erlsom [1] and the driver used in ejabberd (which unfortunately is GPL).<br>
<br>I don't care about DTD validation.<br><br>Thank you,<br><br>r.<br><br>[1] <a href="http://erlsom.sourceforge.net/erlsom.htm" target="_blank">http://erlsom.sourceforge.net/erlsom.htm</a>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>