PHP SAX XML Stream Reader

Installs: 8 915

Dependents: 2

Stars: 24

Watchers: 6

Forks: 9

Open Issues: 4

v1.0.8 2015-03-10 15:52 UTC


Build Status Dependency Status Latest Stable Version Montly Downloads

Code Coverage Scrutinizer Quality Score SensioLabsInsight

PHP XML Stream Reader

Reads XML from either a string or a stream, allowing the registration of callbacks when an elemnt is found that matches path.

Installation with Composer

Declare xmlStreamReader as a dependency in your projects composer.json file:

    "require": {
      "hobnob/xml-stream-reader": "1.0.*"

Usage Example


$xmlParser = new \Hobnob\XmlStreamReader\Parser();

    function( \Hobnob\XmlStreamReader\Parser $parser, \SimpleXMLElement $node ) {
        // do stuff with $node

    function( \Hobnob\XmlStreamReader\Parser $parser, $attrValue ) {
        // do stuff with $attrValue

$xmlParser->parse(fopen('file.xml', 'r'));



© David North

Released under the The MIT License