Skip to content

seanbehan/htmlxpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

HTMLXPath is a small utility for consuming HTML web pages and querying using XPath.

Install

composer require htmlxpath/htmlxpath

Usage

<?php
require 'vendor/autoload.php';

foreach(HTMLXPath\xpath('http://www.seanbehan.com', '//a/text()') as $node)
  echo $node->nodeValue;

// or...
foreach(HTMLXPath\html(file_get_contents('http://seanbehan.com')) as $doc)
  foreach(HTMLXPath\query($doc, '//a/text()') as $node)
    echo $node->nodeValue;

About

PHP package for parsing HTML with XPath

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages