PHP Classes
elePHPant
Icontem

CSS Query: Get elements from an HTML page using CSS selectors

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-08-05 (8 years ago) RSS 2.0 feedStarStarStarStar 64%Total: 1,382 All time: 2,745 This week: 656Up
Version License PHP version Categories
cssquery 1.0MIT/X Consortium ...5.0HTML, XML, PHP 5
Description Author

This class can be used to get elements from an HTML document using CSS selectors similar to Xpath.

It can load an HTML document and perform queries for elements using CSS selectors as query parameters. The search may be applied to the whole document or just to a list of document elements.

The class returns an array of document elements as DOMNode objects that match the query.

Innovation Award
PHP Programming Innovation award nominee
June 2009
Number 2


Prize: One subscription to the PDF edition of the PHP Architect magazine
CSS is a standard that allows you to assign style properties to elements in a page that match a given selector path to match elements by class or identifier.

This class provides a solution to search and extract page elements using the CSS selector path specification.

Manuel Lemos
Name: Sam Shull <contact>
Classes: 9 packages by
Country: United States United States
Age: 41
All time rank: 35140 in United States United States
Week rank: 529 Down55 in United States United States Down
Innovation award
Innovation award
Nominee: 8x

  Files folder image Files  
File Role Description
Accessible without login Plain text file CSSQuery_test.php Example An example of many selector uses
Accessible without login Plain text file CSSQuery.php Class The class file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,382
This week:0
All time:2,745
This week:656Up
User Ratings User Comments (1)
 All time
Utility:91%StarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:-
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:797
 
very interesting to parse the DOM
8 years ago (Roberto Aleman)
70%StarStarStarStar