class simple_html_dom_node

simple html dom node PaperG - added ability for "find" routine to lowercase the value of the selector.

PaperG - added $tag_start to track the start position of the tag in the total byte index

Properties

$nodetype
$tag
$attr
$children
$nodes
$parent
$_
$tag_start

Methods

__construct($dom)

No description

__destruct()

No description

__toString()

No description

clear()

No description

dump($show_attr = true, $deep = 0)

No description

dump_node($echo = true)

No description

parent($parent = null)

No description

has_child()

No description

children($idx = -1)

No description

first_child()

No description

last_child()

No description

next_sibling()

No description

prev_sibling()

No description

find_ancestor_tag($tag)

No description

innertext()

No description

outertext()

No description

text()

No description

xmltext()

No description

makeup()

No description

find($selector, $idx = null, $lowercase = false)

No description

seek($selector, $ret, $lowercase = false)

No description

match($exp, $pattern, $value)

No description

parse_selector($selector_string)

No description

__get($name)

No description

__set($name, $value)

No description

__isset($name)

No description

__unset($name)

No description

convert_text($text)

No description

static boolean
is_utf8(mixed $str)

Returns true if $string is valid UTF-8 and false otherwise.

array
get_display_size()

Function to try a few tricks to determine the displayed size of an img on the page.

getAllAttributes()

No description

getAttribute($name)

No description

setAttribute($name, $value)

No description

hasAttribute($name)

No description

removeAttribute($name)

No description

getElementById($id)

No description

getElementsById($id, $idx = null)

No description

getElementByTagName($name)

No description

getElementsByTagName($name, $idx = null)

No description

parentNode()

No description

childNodes($idx = -1)

No description

firstChild()

No description

lastChild()

No description

nextSibling()

No description

previousSibling()

No description

hasChildNodes()

No description

nodeName()

No description

appendChild($node)

No description

Details

at line 128
__construct($dom)

Parameters

$dom

at line 134
__destruct()

at line 139
__toString()

at line 145
clear()

at line 154
dump($show_attr = true, $deep = 0)

Parameters

$show_attr
$deep

at line 179
dump_node($echo = true)

Parameters

$echo

at line 245
parent($parent = null)

Parameters

$parent

at line 260
has_child()

at line 266
children($idx = -1)

Parameters

$idx

at line 280
first_child()

at line 290
last_child()

at line 300
next_sibling()

at line 321
prev_sibling()

at line 333
find_ancestor_tag($tag)

Parameters

$tag

at line 355
innertext()

at line 367
outertext()

at line 427
text()

at line 461
xmltext()

at line 470
makeup()

at line 506
find($selector, $idx = null, $lowercase = false)

Parameters

$selector
$idx
$lowercase

at line 559
protected seek($selector, $ret, $lowercase = false)

Parameters

$selector
$ret
$lowercase

at line 656
protected match($exp, $pattern, $value)

Parameters

$exp
$pattern
$value

at line 678
protected parse_selector($selector_string)

Parameters

$selector_string

at line 726
__get($name)

Parameters

$name

at line 742
__set($name, $value)

Parameters

$name
$value

at line 762
__isset($name)

Parameters

$name

at line 774
__unset($name)

Parameters

$name

at line 780
convert_text($text)

Parameters

$text

at line 832
static boolean is_utf8(mixed $str)

Returns true if $string is valid UTF-8 and false otherwise.

Parameters

mixed $str String to be tested

Return Value

boolean

at line 877
array get_display_size()

Function to try a few tricks to determine the displayed size of an img on the page.

NOTE: This will ONLY work on an IMG tag. Returns FALSE on all other tag types.

Return Value

array an array containing the 'height' and 'width' of the image on the page or -1 if we can't figure it out.

at line 958
getAllAttributes()

at line 959
getAttribute($name)

Parameters

$name

at line 960
setAttribute($name, $value)

Parameters

$name
$value

at line 961
hasAttribute($name)

Parameters

$name

at line 962
removeAttribute($name)

Parameters

$name

at line 963
getElementById($id)

Parameters

$id

at line 964
getElementsById($id, $idx = null)

Parameters

$id
$idx

at line 965
getElementByTagName($name)

Parameters

$name

at line 966
getElementsByTagName($name, $idx = null)

Parameters

$name
$idx

at line 967
parentNode()

at line 968
childNodes($idx = -1)

Parameters

$idx

at line 969
firstChild()

at line 970
lastChild()

at line 971
nextSibling()

at line 972
previousSibling()

at line 973
hasChildNodes()

at line 974
nodeName()

at line 975
appendChild($node)

Parameters

$node