PHPackages                             jorgecasas/htmldomparser - 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. jorgecasas/htmldomparser

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

jorgecasas/htmldomparser
========================

PHP HTML DOM Parser

22461PHP

Since Oct 3Pushed 5y ago2 watchersCompare

[ Source](https://github.com/jorgecasas/htmldomparser)[ Packagist](https://packagist.org/packages/jorgecasas/htmldomparser)[ RSS](/packages/jorgecasas-htmldomparser/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

HTML DOM Parser
===============

[](#html-dom-parser)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see .

- **More info**: ITERNOVA \[\]
- **Based on**:

Example
-------

[](#example)

```
Usage Example:
// Create a DOM object
$dom = new HTMLDOMParser\DOM();

// Load HTML from a string
$dom->load('Hello World!');

// Find an element
$element = $dom->find( 'div' );

// Modify elements
foreach( $dom->find( '.foo' ) as $element ) {
	$element->innertext = 'Hi World!';
}

// Also... modify first div element style...
$dom->find( 'div', 0 )->style = 'border:1px solid #CCCCCC;';

// Or CSS classes... modify first div element...
$dom->find( 'div[id=hello_div]', 0 )->class = 'bar';

// Or content!
$dom->find( 'div', 0)->innertext = 'Hi again!';

// Return HTML from DOM tree
$str_html = $dom->get_html();
```

Composer.json
-------------

[](#composerjson)

In order to use composer, complete your composer.json file with:

```
{
    "require": {
       "jorgecasas/htmldomparser": "dev-master"
    }
}
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b96dbe068465a2c19faf52bf1340af85c66d2fb5b048645029bd8f461c988b5?d=identicon)[jorgecasas](/maintainers/jorgecasas)

---

Top Contributors

[![jorgecasas](https://avatars.githubusercontent.com/u/968843?v=4)](https://github.com/jorgecasas "jorgecasas (7 commits)")

---

Tags

domhacktoberfesthtmlhtml-dom-parserphp

### Embed Badge

![Health badge](/badges/jorgecasas-htmldomparser/health.svg)

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

###  Alternatives

[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M56](/packages/roave-backward-compatibility-check)[robinvdvleuten/ulid

Universally Unique Lexicographically Sortable Identifier (ULID) implementation for PHP.

4583.6M29](/packages/robinvdvleuten-ulid)[bref/extra-php-extensions

Extra PHP extensions for your lambda application.

2244.3M8](/packages/bref-extra-php-extensions)[mageplaza/magento-2-seo-extension

Magento 2 SEO extension

138506.6k2](/packages/mageplaza-magento-2-seo-extension)[mattketmo/camel

Tiny library to handle words case transformation

29357.0k17](/packages/mattketmo-camel)

PHPackages © 2026

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