note 50039 added to function.simplexml-element-xpath
| From: | nelson dot menezes at yahoo dot co dot uk | Date: | Wed, 16 Feb 2005 09:56:33 +0000 |
| Subject: | note 50039 added to function.simplexml-element-xpath | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85103@lists.php.net to get a copy of this message | ||
Regarding the note about the return of this function "not retaining tag attributes". This
is not true at all (PHP 5.0.3); The attributes are kept for each member of the array returned. So
this:
<a>
<b value="1">xxx1</b>
<b value="2">xxx2</b>
</a>
An xpath of "/a/b" would return an array with two SimpleXMLElements; each can have their
tag properties read like so:
$array_element['value']
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-element-xpath.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50039
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50039&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50039&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50039&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50039&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50039&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50039&report=yes
Search -- http://master.php.net/manage/user-notes.php