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)    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 718 All time: 4,603 This week: 96Up
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.

Recommendations

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

Picture of Dave Smith
  Performance   Level  
Name: Dave Smith is available for providing paid consulting. Contact Dave Smith .
Classes: 51 packages by
Country: United States United States
Age: 58
All time rank: 618 in United States United States
Week rank: 21 Up3 in United States United States Up
Innovation award
Innovation award
Nominee: 32x

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  
 0%
Total:718
This week:0
All time:4,603
This week:96Up