PHPackages                             dkrnl/simplexmlreader - 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. dkrnl/simplexmlreader

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

dkrnl/simplexmlreader
=====================

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

1.1(8y ago)112951.5k↓18.9%44[3 issues](https://github.com/dkrnl/SimpleXMLReader/issues)PDDL-1.0PHPPHP &gt;=5.3.0

Since Aug 18Pushed 2y ago9 watchersCompare

[ Source](https://github.com/dkrnl/SimpleXMLReader)[ Packagist](https://packagist.org/packages/dkrnl/simplexmlreader)[ Docs](https://github.com/dkrnl/SimpleXMLReader)[ RSS](/packages/dkrnl-simplexmlreader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

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

[](#simple-xml-reader)

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

**Minimum the memory** usage of other xml libraries(SimpleXML, DOMXML).

Usage example 1:

```
$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();
```

Usage example 2:

License: Public Domain

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity52

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~272 days

Total

3

Last Release

3016d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3031bc425943e3cb62cef975d62d4e7b8c644e7ff38f1dbad5b7325b62e85afe?d=identicon)[dkrnl](/maintainers/dkrnl)

---

Top Contributors

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

---

Tags

xmliteratorXMLReaderSimpleXML

### Embed Badge

![Health badge](/badges/dkrnl-simplexmlreader/health.svg)

```
[![Health](https://phpackages.com/badges/dkrnl-simplexmlreader/health.svg)](https://phpackages.com/packages/dkrnl-simplexmlreader)
```

###  Alternatives

[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)[vipnytt/sitemapparser

XML Sitemap parser class compliant with the Sitemaps.org protocol.

772.2M10](/packages/vipnytt-sitemapparser)

PHPackages © 2026

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