PHPackages                             dcarbone/dom-plus - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dcarbone/dom-plus

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

dcarbone/dom-plus
=================

A DOMDocument class wrapper that adds some simple improvements

1.3.1(12y ago)4135MITPHPPHP &gt;=5.3.3

Since Dec 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/dcarbone/dom-plus)[ Packagist](https://packagist.org/packages/dcarbone/dom-plus)[ Docs](https://github.com/dcarbone/dom-plus)[ RSS](/packages/dcarbone-dom-plus/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (15)Used By (0)

dom-plus
========

[](#dom-plus)

A simple DOMDocument class wrapper that adds some simple improvements

Inclusion in your Composer application
--------------------------------------

[](#inclusion-in-your-composer-application)

```
"require" : {
    "dcarbone/dom-plus" : "1.3.*"
}
```

This class utilizes the PHP DOMDocument method [registerNodeClass](http://www.php.net/manual/en/domdocument.registernodeclass.php) to extend several classes.

What this means is that whenever create a new instance of `DCarbone\DOMPlus\DOMDocumentPlus`, all DOMNode, DOMElement, DOMText, and DOMCharacterData objects contained within the document are instantiated as the modified classes I have included in this library.

So if you execute:

```
$dom = new DOMDocumentPlus;

$div = $dom->createElement('div');

echo get_class($div);
```

Instead of seeing **DOMElement**, you will see **DCarbone\\DOMPlus\\DOMElementPlus**. Same goes for:

```
$text = $dom->createTextNode('text!'); // returns DCarbone\DOMPlus\DOMTextPlus
```

Additionally, these methods will also exist if you try to consume XML with this class. However **I have not done any testing with XML documents!**. If you use this with XML and find issues, please report them

[INodePlus](INODEPLUS.md)
-------------------------

[](#inodeplus)

This interface is applied to all concrete classes provided by this library. Click the link above to peruse the provided methods.

[DOMDocumentPlus](DOMDOCUMENTPLUS.md)
-------------------------------------

[](#domdocumentplus)

DOMDocumentPlus has some enhancements inspired by [Artem Russakovskii's SmartDOMDocument Class](http://beerpla.net/projects/smartdomdocument-a-smarter-php-domdocument-class/).

[DOMElementPlus](DOMELEMENTPLUS.md)
-----------------------------------

[](#domelementplus)

DOMElementPlus contains some additional HTML-specific features, such as style and class attribut helper methods

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~4 days

Total

14

Last Release

4399d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/385c0c0eae1b51f1e81ee464ff6bfb3cce32589ac252ca68cc3a8aec2e3ada14?d=identicon)[dcarbone](/maintainers/dcarbone)

---

Top Contributors

[![dcarbone](https://avatars.githubusercontent.com/u/1392439?v=4)](https://github.com/dcarbone "dcarbone (22 commits)")

---

Tags

phpdomdocumentsmartdomdocument

### Embed Badge

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

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

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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