note 50039 deleted from function.simplexml-element-xpath by danbrown
| From: | danbrown@php.net | Date: | Wed, 16 Sep 2009 15:55:02 +0000 |
| Subject: | note 50039 deleted from function.simplexml-element-xpath by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160697@lists.php.net to get a copy of this message | ||
Note Submitter: nelson dot menezes at yahoo dot co dot uk
----
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']