note 112415 added to simplexmlelement.attributes
| From: | adrian at foeder dot de | Date: | Fri, 14 Jun 2013 10:15:19 +0000 |
| Subject: | note 112415 added to simplexmlelement.attributes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195219@lists.php.net to get a copy of this message | ||
in order to get a possibly present xml:space attribute, use the following construct:
<?php
$simpleXmlElement->element->attributes('http://www.w3.org/XML/1998/namespace')->space;
?>
This will, for example, return 'preserve' if set.
Just passing by 'xml' as namespace argument of the attribute() method didn't work out
for me. Passing by the complete namespace URI works also if it is not explicitly defined in the
underlying XML document.
Also, $simpleXmlElement->getNamespaces() does not return anything of use.
----
Server IP: 213.172.110.14
Probable Submitter: 217.92.99.125
----
Manual Page -- http://php.net/manual/en/simplexmlelement.attributes.php
Edit -- https://master.php.net/note/edit/112415
Del: integrated -- https://master.php.net/note/delete/112415/integrated
Del: useless -- https://master.php.net/note/delete/112415/useless
Del: bad code -- https://master.php.net/note/delete/112415/bad+code
Del: spam -- https://master.php.net/note/delete/112415/spam
Del: non-english -- https://master.php.net/note/delete/112415/non-english
Del: in docs -- https://master.php.net/note/delete/112415/in+docs
Del: other reasons-- https://master.php.net/note/delete/112415
Reject -- https://master.php.net/note/reject/112415
Search -- https://master.php.net/manage/user-notes.php