note 89391 added to function.simplexml-element-attributes
| From: | JeffM at osu1 dot php dot net | Date: | Thu, 05 Mar 2009 16:59:49 +0000 |
| Subject: | note 89391 added to function.simplexml-element-attributes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-151528@lists.php.net to get a copy of this message | ||
It's helpful if you don't think of 'SimpleXML' as 'DOM' because
it's not. SimpleXML is an 'Object Mapping XML API', which means it converts the XML
elements into the native data types used by PHP.
So attributes on an 'element' are accessible using standard
array notation:
$simplexml->path->to->descendant['attribute-name']
Dead simple, pun intended ;)
skerr at mojavi dot org nailed it in post #7.
----
Server IP: 69.147.83.197
Probable Submitter: 86.129.181.146
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-element-attributes.php
Edit -- https://master.php.net/note/edit/89391
Del: integrated -- https://master.php.net/note/delete/89391/integrated
Del: useless -- https://master.php.net/note/delete/89391/useless
Del: bad code -- https://master.php.net/note/delete/89391/bad+code
Del: spam -- https://master.php.net/note/delete/89391/spam
Del: non-english -- https://master.php.net/note/delete/89391/non-english
Del: in docs -- https://master.php.net/note/delete/89391/in+docs
Del: other reasons-- https://master.php.net/note/delete/89391
Reject -- https://master.php.net/note/reject/89391
Search -- https://master.php.net/manage/user-notes.php