title: PHP not have access to the LibXML2 SAX interface?
body: <p>PHP not have a "<a href="http://en.wikipedia.org/wiki/Simple_API_for_XML" rel="nofollow noreferrer">standard SAX</a>" interface for <em>event-driven XML parse</em>, <a href="http://www.php.net/manual/en/xml.requirements.php" rel="nofollow noreferrer">have a Expat one</a>. <em>Expat</em> require <code>--enable-libxml</code> option... But <a href="http://www.xmlsoft.org/interface.html" rel="nofollow noreferrer">LibXML2 have a good and fast standard SAX interface</a> (!)... So, <strong>how to access the LibXML2's <em>standard SAX interface</em> with PHP?</strong></p>
  
  <p>There are a simple workaround to enable the SAX interface?</p>
  
  <hr>
  
  <p>Related question: <a href="https://stackoverflow.com/q/3048437/287948">Is XMLReader a SAX parser, a DOM parser, or neither?</a></p>
  
  <p><strong>Terminology</strong> (to say the "same language" in the discussions):</p>
  
  <ul>
  <li><p><em>event-driven XML parser</em>: SAX and Expat, they was 1998's "competidors", but today (2013's) are only a "reference model for interfacing the parser implementation".</p></li>
  <li><p><em>event-driven XML parser</em> implementations: see <a href="http://www.xmlsoft.org/" rel="nofollow noreferrer">LibXML2</a>, <a href="http://expat.sourceforge.net/" rel="nofollow noreferrer">expat.sourceforge</a>, <a href="http://docs.oracle.com/javase/6/docs/api/index.html?org/xml/sax/package-summary.html" rel="nofollow noreferrer">Oracle/Java/SAX</a>, etc. They are "concrete implementations" (can generate binary code for the parser). </p></li>
  <li><p><em>SAX interface</em>: an abstraction based on the "SAX reference model", see <a href="http://www.saxproject.org/quickstart.html" rel="nofollow noreferrer">saxproject.org</a> and <a href="http://en.wikipedia.org/wiki/Simple_API_for_XML" rel="nofollow noreferrer">Wikipedia</a>.</p></li>
  <li><p><em>Expat interface</em>: an abstraction based on the "Expat reference model", see <a href="http://www.jclark.com/xml/expatfaq.html" rel="nofollow noreferrer">jclark.com/xml</a> and <a href="http://en.wikipedia.org/wiki/Expat_(XML)" rel="nofollow noreferrer">Wikipedia</a>.</p></li>
  <li><p>PHP's <a href="http://www.php.net/manual/en/ref.xml.php" rel="nofollow noreferrer">XML Parser</a> conventions for an <em>event-driven XML parser interface</em>... <strong>Is a Expat interface</strong> but, it is over the <em>Expat</em> or the <em>LibXML2</em> implementation??</p></li>
  <li><p><em>PHP's SAX interface</em>: not exist (!), but can be build as more one LibXML2 interface? </p></li>
  <li><p>PHP's "other XML parser interfaces": remember that <a href="http://php.net/manual/en/class.domdocument.php" rel="nofollow noreferrer">DomDocument</a>, <a href="http://www.php.net/manual/en/class.xsltprocessor.php" rel="nofollow noreferrer">XSLTProcessor</a>, etc. are PHP interfaces to the LibXML2 implementations. </p></li>
  </ul>
  
  <p>PS: please edit this text for better or detailed explanations... Detailing "library interface": is a set of function names, methods and properties, used as "module interface" between PHP (for programmers abstrations) and a library implementation (drivers, etc. for assembler/binary concrete implementation). </p>