Class HtmlParser
Class HtmlParser. To use, create an instance of the class passing HTML text. Then invoke parse() until it's false. When parse() returns true, $iNodeType, $iNodeName $iNodeValue and $iNodeAttributes are updated.
Copyright (c) 2003 Starnetsys, LLC. All rights reserved. Redistribution of source must retain this copyright notice.
Starnetsys, LLC (http://starnetsys.com) specializes in website design and software consulting
Copyright: Starnetsys, LLC.
Author: Starnetsys, LLC.
Located at classes/class.htmlparser.php
public
|
#
HtmlParser( string $aHtmlText )
Constructor. Constructs an HtmlParser instance with the HTML text given. |
public
boolean
|
|
public
|
|
public
boolean
|
|
public
number
|
|
public
boolean
|
|
public
Ambigous
|
|
public
Ambigous
|
|
public
Ambigous
|
|
public
Ambigous
|
|
public
number
|
|
public
boolean
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
#
skipToStringInTag( string $needle )
Returns text between current position and $needle, inclusive, or "" if not found. The current index is moved to a point after the location of $needle, or not moved at all if nothing is found. |
integer |
NODE_TYPE_ELEMENT
|
1 |
#
node type ID for elements |
integer |
NODE_TYPE_ENDELEMENT
|
2 |
#
node type ID for endelements |
integer |
NODE_TYPE_TEXT
|
3 |
#
node type ID for texts |
integer |
NODE_TYPE_COMMENT
|
4 |
#
node type ID for comments |
integer |
NODE_TYPE_DONE
|
5 |
#
node type ID when done |
public
integer
|
$iNodeType |
|
#
Field iNodeType. May be one of the NODE_TYPE_* constants above. |
public
string
|
$iNodeName | "" |
#
Field iNodeName. For elements, it's the name of the element. |
public
string
|
$iNodeValue | "" |
#
Field iNodeValue. For text nodes, it's the text. |
public
array
|
$iNodeAttributes |
|
#
Field iNodeAttributes. A string-indexed array containing attribute values of the current node. Indexes are always lowercase. |
public
unknown_type
|
$iHtmlText |
|
|
public
unknown_type
|
$iHtmlTextLength |
|
|
public
unknown_type
|
$iHtmlTextIndex | 0 |