diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testdom | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/testdom b/tests/testdom index 66281d310b..a1077d031b 100644 --- a/tests/testdom +++ b/tests/testdom @@ -7,9 +7,11 @@ function output_node($node, $level=0) { echo " "; echo "<".$node->name; $attributes = $node->attributes(); - if(is_array($attributes)) - for(reset($attributes); $attrname = key($attributes); next($attributes)) - echo " ".$attrname."=".$node->getattr($attrname); + if(is_array($attributes)) { +//var_dump($attributes); + foreach($attributes as $attribute) + echo " ".$attribute->name."=".$node->getattr($attribute->name); + } echo ">\n"; $children = $node->children(); for($i=0; $i < count($children); $i++) |