PHP Classes

HTML Parser: Parse HTML using DOMDocument

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2015-05-30 (4 years ago) RSS 2.0 feedNot enough user ratingsTotal: 682 This week: 1All time: 4,697 This week: 337Up
Version License PHP version Categories
html-parser 1.0GNU General Publi...5HTML, PHP 5, Parsers
Description Author

This class can parse HTML documents using DOMDocument.

It can load the HTML markup either from a file or from a text string.

It can parse the entire document, returning an array of elements.

It can parse the document for a specific element, returning an array of each element found. It also can return the element's child elements.

It can return an element referenced by a given ID.

It can display the returned results in a human readable form.


Retrieve a page content
I need a crawler to get a data from an url

HTML config
Need to parse

Extract body text in html document
I need to parse a HTML document and extract the text part

Best crawler for specific Web sites
How can choose pertinent paragraphs for indexing a specific site

DOMDocument find tag, child elements and attributes
Find tag and child elements in DOMDocument

  Performance   Level  
Name: Dave Smith is available for providing paid consulting. Contact Dave Smith .
Classes: 48 packages by
Country: United States United States
Age: 55
All time rank: 819 in United States United States
Week rank: 9 Up1 in United States United States Up
Innovation award
Innovation award
Nominee: 31x

Winner: 7x


  Files folder image Files  
File Role Description
Accessible without login HTML file example.html Data Example markup for parsing
Accessible without login Plain text file example.php Example Example Usage
Plain text file html.parser.class.php Class Main Class
Accessible without login Plain text file license.txt Lic. License
Accessible without login Plain text file manual.txt Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:1
All time:4,697
This week:337Up

For more information send a message to info at phpclasses dot org.