File: manual.txt

Recommend this page to a friend!
  Classes of Dave Smith  >  HTML Parser  >  manual.txt  >  Download  
File: manual.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: HTML Parser
Parse HTML using DOMDocument
Author: By
Last change:
Date: 6 years ago
Size: 1,815 bytes
 

Contents

Class file image Download
Class: html parser
Version: 1.0 5/5/2015

Copyright 2015 Wagon Trader

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.


Description:

This class allows you to parser html documents using DOMDocument.

It can load the html markup as either a file or text.

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 descendents for each element.

It can return the element referenced by an ID.

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

Files:

html.parser.class.php - Main class

example.php - Example usage script

example.html - Example markup for parsing


Installation:

Upload files to a web accessible location on your server (eg. public_html)


Configuration:

The class if configured to work with most server configurations. You can change the following settings in the class should you need to...

$startSep - The starting separator symbol in the element path

$endSep - The ending separator symbol in the element path


Usage:

The included example.php file includes examples on instantiating the class and basic operation instructions.
For more information send a message to info at phpclasses dot org.