torann/dom-parser
A HTML DOM parser written in PHP7 let you manipulate HTML in a very easy way! Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.
Maintainers
Requires
- php: ^7.1|^8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-06-18 06:05:53 UTC
README
👁 Latest Stable Version
👁 Total Downloads
👁 Patreon donate button
👁 Donate weekly to this project using Gratipay
👁 Donate to this project using Flattr
👁 Donate to this project using Paypal
A HTML DOM parser written in PHP7 let you manipulate HTML in a very easy way! Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.
Usage
From a string:
use Torann\DomParser\HtmlDom; $dom = HtmlDom::fromString($str); $elements = $dom->find($el_name);
From a file:
use Torann\DomParser\HtmlDom; $dom = HtmlDom::fromFile($file_name); $elements = $dom->find($el_name);
