note 76529 deleted from ref.simplexml by danbrown
| From: | danbrown@php.net | Date: | Mon, 18 May 2009 01:20:09 +0000 |
| Subject: | note 76529 deleted from ref.simplexml by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155519@lists.php.net to get a copy of this message | ||
Note Submitter: julien plee using G mail dot com
----
<to bens at effortlessis dot com>
I see your problem, but there's a workaround.
After loading your SimpleXML object into $xml, call $xml->getName () and you'll get your
root tag name.
I use PHP 5.1.4 on Apache 1.3.33 on MacOS X and this works on it. I hope there was no SimpleXML
ability downgrading :o)
Also, I kinda remember reading somewhere in this doc an advise saying "Don't use data
structures parsers like var_dump() on SimpleXML." This may be the reason. And you may will work
your second problem around using SimpleXMLElement->attributes() and SimpleXMLElement->getName
().