note 76529 added to ref.simplexml

From: Date: Thu, 19 Jul 2007 10:45:50 +0000
Subject: note 76529 added to ref.simplexml
Groups: php.notes 
Request: Send a blank email to php-notes+get-128723@lists.php.net to get a copy of this message
<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 (). ---- Server IP: 195.221.21.36 Probable Submitter: 82.241.244.168 ---- Manual Page -- http://www.php.net/manual/en/ref.simplexml.php Edit -- https://master.php.net/note/edit/76529 Del: integrated -- https://master.php.net/note/delete/76529/integrated Del: useless -- https://master.php.net/note/delete/76529/useless Del: bad code -- https://master.php.net/note/delete/76529/bad+code Del: spam -- https://master.php.net/note/delete/76529/spam Del: non-english -- https://master.php.net/note/delete/76529/non-english Del: in docs -- https://master.php.net/note/delete/76529/in+docs Del: other reasons-- https://master.php.net/note/delete/76529 Reject -- https://master.php.net/note/reject/76529 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128723) next »