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

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

mr-lexx/simplexmlreader
=======================

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

1.0.0(6mo ago)039PDDL-1.0PHPPHP ^7.4 || ^8.0

Since Dec 16Pushed 6mo agoCompare

[ Source](https://github.com/mrLexx/SimpleXMLReader)[ Packagist](https://packagist.org/packages/mr-lexx/simplexmlreader)[ Docs](https://github.com/mrLexx/SimpleXMLReader)[ RSS](/packages/mr-lexx-simplexmlreader/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)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

32

—

LowBetter than 69% of packages

Maintenance66

Regular maintenance activity

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.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

199d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2160323?v=4)[Valery](/maintainers/mrLexx)[@mrLexx](https://github.com/mrLexx)

---

Top Contributors

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

---

Tags

xmliteratorXMLReaderSimpleXML

### Embed Badge

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

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

###  Alternatives

[sabre/xml

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

55234.6M141](/packages/sabre-xml)[dkrnl/simplexmlreader

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

112953.7k](/packages/dkrnl-simplexmlreader)[halilim/xml-iterator

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

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

Iterators for PHP XMLReader for ease of parsing

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

A fluent api for the php dom extension.

342312.4k17](/packages/fluentdom-fluentdom)[vipnytt/sitemapparser

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

832.3M10](/packages/vipnytt-sitemapparser)

PHPackages © 2026

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