PHPackages                             dmt-software/xml-parser - 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. dmt-software/xml-parser

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

dmt-software/xml-parser
=======================

Iterate over the elements within a xml

0.7.1(6mo ago)0811MITPHPPHP &gt;=7.4

Since Feb 14Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/dmt-software/xml-parser)[ Packagist](https://packagist.org/packages/dmt-software/xml-parser)[ RSS](/packages/dmt-software-xml-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (11)Used By (1)

XML Parser
==========

[](#xml-parser)

Install
-------

[](#install)

```
composer require dmt-software/xml-parser
```

Usage
-----

[](#usage)

Iterate over all the elements within the xml.

```
use DMT\XmlParser\Parser;
use DMT\XmlParser\Source\StringParser;
use DMT\XmlParser\Tokenizer\XmlParserTokenizer;

$xml = '
    A book title
    An other book title
';

$parser = new Parser(new XmlParserTokenizer(new StringParser($xml));
while ($node = $parser->parse()) {
    // iterates: node , node , node , text-node "A book title", node  etc
}
```

Select an element and call *parseXml* to get the current element including its contents.

```
while ($node = $parser->parse()) {
    if ($node->localName !== 'book') {
        continue;
    }
    $book = $parser->parseXml();
    break;
}
// book is "A book title"
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance69

Regular maintenance activity

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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 ~112 days

Recently: every ~248 days

Total

10

Last Release

180d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec6b7fbb4d231b5c2c76348cf3a13ec5e82c64a1826142f6ec0db1cf15db2873?d=identicon)[proggeler](/maintainers/proggeler)

---

Top Contributors

[![proggeler](https://avatars.githubusercontent.com/u/18281353?v=4)](https://github.com/proggeler "proggeler (23 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dmt-software-xml-parser/health.svg)

```
[![Health](https://phpackages.com/badges/dmt-software-xml-parser/health.svg)](https://phpackages.com/packages/dmt-software-xml-parser)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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