PHPackages                             mastermunj/advanced\_html\_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. mastermunj/advanced\_html\_dom

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

mastermunj/advanced\_html\_dom
==============================

A better drop-in replacement for PHP's simple html dom.

0.0.4(9y ago)04332MITPHPPHP &gt;=5.3

Since Aug 12Pushed 9y ago1 watchersCompare

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

READMEChangelog (4)DependenciesVersions (4)Used By (0)

Update: I tested this library with php 7.0.1 - 7.0.5 as well as PHP 5.3 and up, everything seems to be working.

The goal of this project is to be a DOM-based drop-in replacement for PHP's simple html dom library.

*How To Use* - The same way as simple. If you use file/str\_get\_html then you don't need to change anything. If you are instantiating with `new simple_html_dom()` then you will need to change that to `new AdvancedHtmlDom()`

*What's Different* - Mostly just formatting (spaces) in the html. This is added by DOM and there's no way around it. Some non-standard selectors have been dropped but many more standard ones have been added. For example: `img[src!=foo]` was removed because it's not a valid selector. Added are things like `a + b` and `a ~ b` or even `a.foo:not(.bar)`

*What's Better*

- 10x-20x Performance increase
- Reduced memory requirement
- Support for many more css selectors

Features

- Supports full set of css pseudo selectors plus many jquery extras: :not, :has, :contains, :gt, :lt, :eq
- Use with css or xpath: $doc-&gt;find('h3 a'), $doc-&gt;find('//h3//a')
- Jquery-style functions replace, wrap, unwrap, before after
- Nodeset math: $doc-&gt;find('a')-&gt;minus($doc-&gt;find('.skip\_me'))
- Lots more features that haven't been documented yet.

If you love Advanced HTML Dom please [vote for it](http://stackoverflow.com/questions/3577641/how-do-you-parse-and-process-html-xml-in-php) here!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.1% 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 ~252 days

Total

3

Last Release

3427d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.4.0

0.0.3PHP &gt;=5.3

### Community

Maintainers

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

---

Top Contributors

[![pguardiario](https://avatars.githubusercontent.com/u/58795222?v=4)](https://github.com/pguardiario "pguardiario (19 commits)")[![mastermunj](https://avatars.githubusercontent.com/u/968242?v=4)](https://github.com/mastermunj "mastermunj (4 commits)")[![jhuebner](https://avatars.githubusercontent.com/u/734277?v=4)](https://github.com/jhuebner "jhuebner (2 commits)")[![sunaram](https://avatars.githubusercontent.com/u/2225482?v=4)](https://github.com/sunaram "sunaram (1 commits)")

---

Tags

xmldomjqueryXpath

### Embed Badge

![Health badge](/badges/mastermunj-advanced-html-dom/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[fluentdom/fluentdom

A fluent api for the php dom extension.

337306.9k17](/packages/fluentdom-fluentdom)[veewee/xml

XML without worries

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

sabre/xml is an XML library that you may not hate.

52832.2M131](/packages/sabre-xml)[querypath/querypath

HTML/XML querying and processing (like jQuery)

8197.0M27](/packages/querypath-querypath)[rct567/dom-query

DomQuery is a PHP library that allows easy 'jQuery like' DOM traversing and manipulation

134261.0k4](/packages/rct567-dom-query)

PHPackages © 2026

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