title: libxml2 vs expat for an XMPP server
body: <p>I'm trying to create an XMPP library (and later a server) from scratch in <a href="http://golang.org/" rel="nofollow noreferrer">Go</a> (although the language itself is irrelevant) as a means to learn what I can about the XMPP protocol and server software development in general.</p>
  
  <p>As many of you know, XMPP is messaging protocol based on XML that depends on an enormous amount of short but frequent XML streams. I'm thinking that for such applications an event based XML parser should be better because I won't need DOM and all that (correct me if I'm wrong). Please keep in mind that this library is intended for servers so there might be many instances run at once; </p>
  
  <p>Which one of the two has better performance and memory usage for that use case, libxml2 or expat?</p>