An open API service indexing awesome lists of open source software.

https://github.com/hkk12369/php-html-parser

A HTML/XML parser written in php using its inbuilt DOMDocument. Supports both CSS and XPath queries. Handles Malformed HTML.
https://github.com/hkk12369/php-html-parser

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

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:
```php
$html = HtmlParser::from_string('

Some Text
');
$text = $html->find('#outer .red', 0)->text;
echo $text; // outputs "Some Text"
```