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(5mo ago)035PDDL-1.0PHPPHP ^7.4 || ^8.0

Since Dec 16Pushed 5mo 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 1mo ago

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

34

—

LowBetter than 77% of packages

Maintenance73

Regular maintenance activity

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

153d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb7ff9aa295f82f5105919dc76502258ef2b6477cb77abb18c7025b5a22ef66c?d=identicon)[mrLexx](/maintainers/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

[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)
