HTML Head Parser - Parses <head> section of a HTML document
This class is based on HeadParser.pm <http://search.cpan.org/author/GAAS/HTML-Parser-3.28/lib/HTML/HeadParser.pm> by Gisle Aas. A lot of the documentation here has been copied from the perl files.
HTML_Head_Parser will only parse the <HEAD>...</HEAD> section of an HTML document. The parse() method will return a FALSE value as soon as some <BODY> element or body text are found, and should not be called again after this.
HTML_Head_Parser keeps a reference to a header object, and the parser will update this header object as the various elements of the <HEAD> section of the HTML document are recognized. The following header fields are affected:
1 require_once(HTTPNAV_ROOT.'HTML_Head_Parser.php');
2 $parser =& new HTML_Head_Parser();
3 // parse HTML, will return false when body tags/text detected
4 $parser->parse($html);
5 // return a HTTP_Headers object
6 $headers =& $parser->get_headers();
Located in Program_Root/HTML_Head_Parser.php (line 45)
Headers
HTML Parser
Tag - name of active element that takes textual content
Text - the accumulated text associated with the element
Parse HTML
set to true if $input is the last chunk of the document.
Documention generated on Wed, 16 Jul 2003 01:03:09 +0100 by phpDocumentor 1.2.0