SQLTerminal.app
now available

XPath.app
now available
Want fresh tech tips in your inbox?

I Just Published My First PHP Package HTMLXPATH

       

I just wrote and published my first PHP package on Packagist.com. It's available on packagist.org and the source code is on github.

To install the package use composer

composer require htmlxpath/htmlxpath

Then you can use it to consume webpages and extract content with xpath.

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

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

It's just a wrapper that creates and sets up a few objects exposing them as generators.

I am quite impressed with the PHP community these days. The number of packages and the way things "just work" is top notch.

Tagged w/ #php #xpath #xml #packaging #development

Apps I've Built

XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app