note 46908 added to ref.dom
| From: | ultralen at hotmail dot com | Date: | Wed, 27 Oct 2004 15:49:47 +0000 |
| Subject: | note 46908 added to ref.dom | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79192@lists.php.net to get a copy of this message | ||
You can get the attributes of a node with the attributes method, e.g.:
$attribs = $node->attributes;
foreach( $attribs as $attrib )
print $attrib->name . "=" . $attrib->value . "\n";
It works for me (php 5.0.1 on win2k). The method is documented in the w3c specs, but I can't
find it in the php html docs.
----
Manual Page -- http://www.php.net/manual/en/ref.dom.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46908
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46908&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46908&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46908&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46908&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46908&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46908&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46908&report=yes
Search -- http://master.php.net/manage/user-notes.php