PHPackages                             wsdltophp/domhandler - 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. wsdltophp/domhandler

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

wsdltophp/domhandler
====================

Decorative design pattern to ease DOM handling

2.0.6(4y ago)31.9M↓10.7%[1 PRs](https://github.com/WsdlToPhp/DomHandler/pulls)1MITPHPPHP &gt;=7.4

Since Apr 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/WsdlToPhp/DomHandler)[ Packagist](https://packagist.org/packages/wsdltophp/domhandler)[ Docs](https://github.com/WsdlToPhp/DomHandler)[ RSS](/packages/wsdltophp-domhandler/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (12)Used By (1)

DOM Handler
===========

[](#dom-handler)

> DOM Handler provides handful methods to manipulate/browse a DOM Document.

[![License](https://camo.githubusercontent.com/f6fd33d1850c3842cb9fe76934b86ab5f78b8836638d3a85cdd07b336c10aaf7/68747470733a2f2f706f7365722e707567782e6f72672f7773646c746f7068702f646f6d68616e646c65722f6c6963656e7365)](https://packagist.org/packages/wsdltophp/domhandler)[![Latest Stable Version](https://camo.githubusercontent.com/9a4eb2b3478ff66d51a7253576bf0d1103946e1150b7ca8cbf9357f86b1a7073/68747470733a2f2f706f7365722e707567782e6f72672f7773646c746f7068702f646f6d68616e646c65722f76657273696f6e2e706e67)](https://packagist.org/packages/wsdltophp/domhandler)[![TeamCity build status](https://camo.githubusercontent.com/c247e02110b76ca05b50d337b10868bd9aec1b873c116e9fdd7b3184685fd6ec/68747470733a2f2f7465616d636974792e6d696b61656c2d64656c736f6c2e66722f6170702f726573742f6275696c64732f6275696c64547970653a69643a5773646c48616e646c65725f4275696c642f73746174757349636f6e2e737667)](https://github.com/WsdlToPhp/DomHandler)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b37f9cd2a8b2ff285b0e23e562b8deb5499a78a49ab18fd718adea29115f7be5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5773646c546f5068702f446f6d48616e646c65722f6261646765732f7175616c6974792d73636f72652e706e67)](https://scrutinizer-ci.com/g/WsdlToPhp/DomHandler/)[![Code Coverage](https://camo.githubusercontent.com/7658f5e8f81f8b96884c3e24dd6ce363f14fb9af90ae134cfec4cc4dbe0e3853/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5773646c546f5068702f446f6d48616e646c65722f6261646765732f636f7665726167652e706e67)](https://scrutinizer-ci.com/g/WsdlToPhp/DomHandler/)[![Total Downloads](https://camo.githubusercontent.com/792be54d78a549fd1470375327cdea3e89875d6f9feb7408565ebe1c757d939e/68747470733a2f2f706f7365722e707567782e6f72672f7773646c746f7068702f646f6d68616e646c65722f646f776e6c6f616473)](https://packagist.org/packages/wsdltophp/domhandler)[![StyleCI](https://camo.githubusercontent.com/037c3a4766bde31bf9db1b9f29059669cb721b479736d80489a69e8c1f38bfd9/68747470733a2f2f7374796c6563692e696f2f7265706f732f38373937373938302f736869656c64)](https://styleci.io/repos/87977980)[![SymfonyInsight](https://camo.githubusercontent.com/7a6fc1103b12f1a7b3559308c0f3c1b03be0a2f960d16fe4b73da18cd259cbfc/68747470733a2f2f696e73696768742e73796d666f6e792e636f6d2f70726f6a656374732f39336537336665622d363062632d346539392d613363652d3837653533376336316665642f6d696e692e737667)](https://insight.symfony.com/projects/93e73feb-60bc-4e99-a3ce-87e537c61fed)

DomHandler uses the [decorator design pattern](https://en.wikipedia.org/wiki/Decorator_pattern) in order to ease DOM handling.

The source code has been originally created into the [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator) project but it felt that it had the possibility to live by itself and to evolve independtly from the PackageGenerator project if necessary.

Testing using [Docker](https://www.docker.com/)
-----------------------------------------------

[](#testing-using-docker)

Thanks to the [Docker image](https://hub.docker.com/r/splitbrain/phpfarm) of [phpfarm](https://github.com/fpoirotte/phpfarm), tests can be run locally under *any* PHP version using the cli:

- php-7.4

First of all, you need to create your container which you can do using [docker-compose](https://docs.docker.com/compose/) by running the below command line from the root directory of the project:

```
$ docker-compose up -d --build
```

You then have a container named `dom_handler` in which you can run `composer` commands and `php cli` commands such as:

```
# install deps in container (using update ensure it does use the composer.lock file if there is any)
$ docker exec -it dom_handler php-7.4 /usr/bin/composer update
# run tests in container
$ docker exec -it dom_handler php-7.4 -dmemory_limit=-1 vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

Developers who helped on this project are listed in the [composer.json](composer.json#L8) file as `Contributor` and are:

- [phordijk](https://github.com/phordijk)

FAQ
---

[](#faq)

Feel free to [create an issue](https://github.com/WsdlToPhp/DomHandler/issues/new).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community11

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 98.6% 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 ~226 days

Recently: every ~105 days

Total

9

Last Release

1516d ago

Major Versions

1.0.1 → 2.0.02021-01-26

PHP version history (2 changes)1.0.0PHP &gt;=5.3.3

2.0.0PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![mikaelcom](https://avatars.githubusercontent.com/u/584391?v=4)](https://github.com/mikaelcom "mikaelcom (73 commits)")[![phordijk](https://avatars.githubusercontent.com/u/4834249?v=4)](https://github.com/phordijk "phordijk (1 commits)")

---

Tags

decoratordecorator-patterndomdom-handlerdomhandlerphp-libraryxmlphpxmldomXpath

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wsdltophp-domhandler/health.svg)

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

###  Alternatives

[veewee/xml

XML without worries

1835.9M29](/packages/veewee-xml)[fluentdom/fluentdom

A fluent api for the php dom extension.

337306.9k17](/packages/fluentdom-fluentdom)[goetas/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

493.3k](/packages/goetas-xsd2php-runtime)[hexydec/htmldoc

A token based HTML document parser and minifier. Minify HTML documents including inline CSS, Javascript, and SVG's on the fly. Extract document text, attributes, and fragments. Full test suite.

2610.3k3](/packages/hexydec-htmldoc)[bupy7/xml-constructor

The array-like constructor of XML document structure.

1337.9k](/packages/bupy7-xml-constructor)

PHPackages © 2026

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