https://github.com/seanbehan/htmlxpath
PHP package for parsing HTML with XPath
https://github.com/seanbehan/htmlxpath
composer html php webscraping xml xpath
Last synced: 2 months ago
JSON representation
PHP package for parsing HTML with XPath
- Host: GitHub
- URL: https://github.com/seanbehan/htmlxpath
- Owner: seanbehan
- Created: 2017-03-28T00:37:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-28T01:28:34.000Z (over 8 years ago)
- Last Synced: 2025-07-08T00:13:17.274Z (4 months ago)
- Topics: composer, html, php, webscraping, xml, xpath
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
HTMLXPath is a small utility for consuming HTML web pages and querying using XPath.
# Install
`composer require htmlxpath/htmlxpath`
# Usage
```php
nodeValue;
// or...
foreach(HTMLXPath\html(file_get_contents('http://seanbehan.com')) as $doc)
foreach(HTMLXPath\query($doc, '//a/text()') as $node)
echo $node->nodeValue;
```