mirror of
https://github.com/php/php-src.git
synced 2024-10-10 03:02:13 +00:00
6048907029
amount of confusion when setting Tidy configuration options. All configuration must now be done pre-parsing of the document. Removed references to the tidy_attr class, as it is no longer used (since tidy 2.0) and made tidy throw exceptions for all truly non-fatal errors.
25 lines
551 B
PHP
25 lines
551 B
PHP
--TEST--
|
|
Accessing attributes of a node
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("tidy")) print "skip"; ?>
|
|
--POST--
|
|
--GET--
|
|
--INI--
|
|
--FILE--
|
|
<?php
|
|
$a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000></BODY></HTML>");
|
|
$body = $a->body();
|
|
var_dump($body->attribute);
|
|
foreach($body->attribute as $key=>$val) {
|
|
echo "Attrib '$key': $val\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
array(2) {
|
|
["bgcolor"]=>
|
|
string(7) "#FFFFFF"
|
|
["alink"]=>
|
|
string(7) "#000000"
|
|
}
|
|
Attrib 'bgcolor': #FFFFFF
|
|
Attrib 'alink': #000000
|