PHPackages                             makinacorpus/simple-xml-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. makinacorpus/simple-xml-reader

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

makinacorpus/simple-xml-reader
==============================

Extends XMLReader PHP class, for simple SAX-reading and XPath queries of huge XML files.

1.0.0(2y ago)26.2k↓10.7%MITPHPPHP &gt;=8.2

Since Jun 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/makinacorpus/php-simple-xml-reader)[ Packagist](https://packagist.org/packages/makinacorpus/simple-xml-reader)[ Docs](https://github.com/makinacorpus/php-simple-xml-reader)[ RSS](/packages/makinacorpus-simple-xml-reader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Simple XML Reader
=================

[](#simple-xml-reader)

Extends XMLReader PHP class, for simple SAX-reading and XPath queries of huge XML files without consuming memory.

Forked from  for adding PHP 8.2 support, unit tests, and static analysis tooling.

Example usage:

```
$reader = new SimpleXMLReader;
$reader->open("big.xml");
$reader->registerCallback("by-node-name", function($reader) {
    $element = $reader->expandSimpleXml(); // copy of the current node as a SimpleXMLElement object
    $attributes = $element->attributes(); // read element attributes
    /* ...your code here... */
    return true;
});
$reader->registerCallback("/by/xpath/query", function($reader) {
    $element = $reader->expandDomDocument(); // copy of the current node as a DOMNode object
    $attributes = $element->attributes(); // read element attributes
    /* ...your code here... */
    return true;
});
$reader->parse();
$reader->close();
```

Original package was licenced under *Public Domain*, this fork is licenced under the MIT licence. All credits for the original code belong to the original author, *Dmitry Pyatkov* (aka *dkrnl*) .

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1078d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69252826f3a70a19fc5dcefb7ef9d26d465bb300245641abb4dd89d0ec391a66?d=identicon)[pounard](/maintainers/pounard)

![](https://www.gravatar.com/avatar/d21b98752b406528da88850922b1061f39bf72eb2126b413d5c12e275811a40b?d=identicon)[Makina Corpus](/maintainers/Makina%20Corpus)

---

Top Contributors

[![dkrnl](https://avatars.githubusercontent.com/u/734622?v=4)](https://github.com/dkrnl "dkrnl (31 commits)")[![pounard](https://avatars.githubusercontent.com/u/341855?v=4)](https://github.com/pounard "pounard (2 commits)")

---

Tags

xmliteratorXMLReaderSimpleXML

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/makinacorpus-simple-xml-reader/health.svg)

```
[![Health](https://phpackages.com/badges/makinacorpus-simple-xml-reader/health.svg)](https://phpackages.com/packages/makinacorpus-simple-xml-reader)
```

###  Alternatives

[dkrnl/simplexmlreader

Wrapper XMLReader class, for simple SAX-reading(and simple XPath-queries) of huge(testing over 1G file) xml.

112951.5k](/packages/dkrnl-simplexmlreader)[sabre/xml

sabre/xml is an XML library that you may not hate.

52832.2M131](/packages/sabre-xml)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[halilim/xml-iterator

XML Reader to simplexml/array iterator with low memory usage and an acceptable level of ease of use.

21373.6k1](/packages/halilim-xml-iterator)[hakre/xmlreaderiterator

Iterators for PHP XMLReader for ease of parsing

60208.0k1](/packages/hakre-xmlreaderiterator)[fluentdom/fluentdom

A fluent api for the php dom extension.

337306.9k17](/packages/fluentdom-fluentdom)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
