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
node type ID for elements |
#
1
|
integer |
NODE_TYPE_ENDELEMENT
node type ID for endelements |
#
2
|
integer |
NODE_TYPE_TEXT
node type ID for texts |
#
3
|
integer |
NODE_TYPE_COMMENT
node type ID for comments |
#
4
|
integer |
NODE_TYPE_DONE
node type ID when done |
#
5
|
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
|