note 46896 added to function.dom-domelement-hasattribute
| From: | permidion at yahoo dot com | Date: | Wed, 27 Oct 2004 11:30:25 +0000 |
| Subject: | note 46896 added to function.dom-domelement-hasattribute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79167@lists.php.net to get a copy of this message | ||
simple exemple of use to retrieve all attributes of an element
foreach ($root->childNodes as $child) {
if ($child->hasAttributes()){
foreach ($child->attributes as $attribute){
print "AttributName= ".$attribute->name. "<br/>\n";
print "AttributValue= ".$attribute->value. "<br/>\n";
}
}
}
----
Manual Page -- http://www.php.net/manual/en/function.dom-domelement-hasattribute.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46896
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46896&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46896&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46896&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46896&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46896&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46896&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46896&report=yes
Search -- http://master.php.net/manage/user-notes.php