--TEST--
Accessing children nodes
--EXTENSIONS--
tidy
--FILE--
hasChildren());
if($node->hasChildren()) {
foreach($node->child as $c) {
var_dump($c);
if($c->hasChildren()) {
dump_nodes($c);
}
}
}
}
$a = tidy_parse_string("
HiByeTest", array('newline' => 'LF'));
$html = $a->html();
dump_nodes($html);
?>
--EXPECTF--
bool(true)
object(tidyNode)#3 (9) {
["value"]=>
string(31) "
"
["name"]=>
string(4) "head"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(7)
["proprietary"]=>
bool(false)
["id"]=>
int(46)
["attribute"]=>
NULL
["child"]=>
array(1) {
[0]=>
object(tidyNode)#4 (9) {
["value"]=>
string(16) "
"
["name"]=>
string(5) "title"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(87)
["proprietary"]=>
bool(false)
["id"]=>
int(%i)
["attribute"]=>
NULL
["child"]=>
NULL
}
}
}
bool(true)
object(tidyNode)#4 (9) {
["value"]=>
string(16) "
"
["name"]=>
string(5) "title"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(87)
["proprietary"]=>
bool(false)
["id"]=>
int(%i)
["attribute"]=>
NULL
["child"]=>
NULL
}
object(tidyNode)#5 (9) {
["value"]=>
string(80) "
HiByeTest
"
["name"]=>
string(4) "body"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(7)
["proprietary"]=>
bool(false)
["id"]=>
int(16)
["attribute"]=>
array(2) {
["bgcolor"]=>
string(7) "#FFFFFF"
["alink"]=>
string(7) "#000000"
}
["child"]=>
array(2) {
[0]=>
object(tidyNode)#6 (9) {
["value"]=>
string(9) "Hi"
["name"]=>
string(1) "b"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(43)
["proprietary"]=>
bool(false)
["id"]=>
int(8)
["attribute"]=>
NULL
["child"]=>
array(1) {
[0]=>
object(tidyNode)#7 (9) {
["value"]=>
string(2) "Hi"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(46)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
}
}
[1]=>
object(tidyNode)#8 (9) {
["value"]=>
string(21) "ByeTest"
["name"]=>
string(1) "i"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(52)
["proprietary"]=>
bool(false)
["id"]=>
int(49)
["attribute"]=>
NULL
["child"]=>
array(2) {
[0]=>
object(tidyNode)#9 (9) {
["value"]=>
string(3) "Bye"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(55)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
[1]=>
object(tidyNode)#10 (9) {
["value"]=>
string(11) "Test"
["name"]=>
string(1) "u"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(58)
["proprietary"]=>
bool(false)
["id"]=>
int(%i)
["attribute"]=>
NULL
["child"]=>
array(1) {
[0]=>
object(tidyNode)#11 (9) {
["value"]=>
string(4) "Test"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(61)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
}
}
}
}
}
}
bool(true)
object(tidyNode)#6 (9) {
["value"]=>
string(9) "Hi"
["name"]=>
string(1) "b"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(43)
["proprietary"]=>
bool(false)
["id"]=>
int(8)
["attribute"]=>
NULL
["child"]=>
array(1) {
[0]=>
object(tidyNode)#7 (9) {
["value"]=>
string(2) "Hi"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(46)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
}
}
bool(true)
object(tidyNode)#7 (9) {
["value"]=>
string(2) "Hi"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(46)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
object(tidyNode)#8 (9) {
["value"]=>
string(21) "ByeTest"
["name"]=>
string(1) "i"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(52)
["proprietary"]=>
bool(false)
["id"]=>
int(49)
["attribute"]=>
NULL
["child"]=>
array(2) {
[0]=>
object(tidyNode)#9 (9) {
["value"]=>
string(3) "Bye"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(55)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
[1]=>
object(tidyNode)#10 (9) {
["value"]=>
string(11) "Test"
["name"]=>
string(1) "u"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(58)
["proprietary"]=>
bool(false)
["id"]=>
int(%i)
["attribute"]=>
NULL
["child"]=>
array(1) {
[0]=>
object(tidyNode)#11 (9) {
["value"]=>
string(4) "Test"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(61)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
}
}
}
}
bool(true)
object(tidyNode)#9 (9) {
["value"]=>
string(3) "Bye"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(55)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
object(tidyNode)#10 (9) {
["value"]=>
string(11) "Test"
["name"]=>
string(1) "u"
["type"]=>
int(5)
["line"]=>
int(1)
["column"]=>
int(58)
["proprietary"]=>
bool(false)
["id"]=>
int(%i)
["attribute"]=>
NULL
["child"]=>
array(1) {
[0]=>
object(tidyNode)#11 (9) {
["value"]=>
string(4) "Test"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(61)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}
}
}
bool(true)
object(tidyNode)#11 (9) {
["value"]=>
string(4) "Test"
["name"]=>
string(0) ""
["type"]=>
int(4)
["line"]=>
int(1)
["column"]=>
int(61)
["proprietary"]=>
bool(false)
["id"]=>
NULL
["attribute"]=>
NULL
["child"]=>
NULL
}