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( mixed $aHtmlText )
Constructor. Constructs an HtmlParser instance with the HTML text given. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
skipToStringInTag( mixed $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 |
|
integer |
NODE_TYPE_ENDELEMENT
|
2 |
|
integer |
NODE_TYPE_TEXT
|
3 |
|
integer |
NODE_TYPE_COMMENT
|
4 |
|
integer |
NODE_TYPE_DONE
|
5 |
public
mixed
|
$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
mixed
|
$iNodeAttributes |
|
#
Field iNodeAttributes. A string-indexed array containing attribute values of the current node. Indexes are always lowercase. |
public
mixed
|
$iHtmlText |
|
|
public
mixed
|
$iHtmlTextLength |
|
|
public
integer
|
$iHtmlTextIndex | 0 |