Skip to content

A HTML/XML parser written in php using its inbuilt DOMDocument. Supports both CSS and XPath queries. Handles Malformed HTML.

Notifications You must be signed in to change notification settings

hkk12369/php-html-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6b51f62 · Nov 19, 2013

History

13 Commits
Sep 10, 2012
Nov 19, 2013

Repository files navigation

PHP HTML Parser

A simple and efficient DOMDocument based PHP HTML and XML Parser. It accepts both css selector and xpath queries to search the document and handles malformed HTML as well.

Example:

$html = HtmlParser::from_string('<div id="outer"><span class="red">Some Text</span></div>');
$text = $html->find('#outer .red', 0)->text;
echo $text;   // outputs "Some Text"

About

A HTML/XML parser written in php using its inbuilt DOMDocument. Supports both CSS and XPath queries. Handles Malformed HTML.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages