PHPackages                             watoki/dom - 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. watoki/dom

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

watoki/dom
==========

A minimal (X)HTML/XML parser for PHP

v0.2(10y ago)313.0k2MITPHPPHP &gt;=5.3.8

Since Oct 14Pushed 10y ago1 watchersCompare

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

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

dom [![Build Status](https://camo.githubusercontent.com/a544edd31cc16b506d196ee607738cac69a8ac6f2f6b73a0c36a7afb46cea145/68747470733a2f2f7472617669732d63692e6f72672f7761746f6b692f646f6d2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/watoki/dom)
=================================================================================================================================================================================================================================================================

[](#dom-)

A very simple (X)HTML/XML parser for PHP. It's goal is that the not manipulated output is as close as possible to the input. This means that it will parse most invalid mark-up without complains.

Usage
-----

[](#usage)

Include *dom* into your project with [composer](http://getcomposer.org/) and then:

```
$parser = new Parser('Custom ');
$parser->getNodes()->first()->setName('Your');
$printer = new Printer();
echo $printer->printNodes($parser->getNodes()); // Custom

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.8% 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 ~573 days

Total

2

Last Release

3652d ago

### Community

Maintainers

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

---

Top Contributors

[![rtens](https://avatars.githubusercontent.com/u/1468866?v=4)](https://github.com/rtens "rtens (30 commits)")[![vortextangent](https://avatars.githubusercontent.com/u/1971148?v=4)](https://github.com/vortextangent "vortextangent (1 commits)")

---

Tags

parserwatoki

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/watoki-dom/health.svg)

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

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M727](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M700](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

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

Parser for CSS Files written in PHP

1.8k191.2M63](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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