note 87083 added to book.simplexml
| From: | QLeap at osu1 dot php dot net | Date: | Tue, 18 Nov 2008 22:27:21 +0000 |
| Subject: | note 87083 added to book.simplexml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146674@lists.php.net to get a copy of this message | ||
Storing SimpleXMLElement values in $_SESSION does not work. Saving the results as an object or
individual elements of the object will result in the dreaded "Warning: session_start()
[function.session-start]: Node no longer exists" error.
For example, this does not work:
$xml = new SimpleXMLElement($page);
$country = $xml->Response->Placemark->AddressDetails->Country->CountryNameCode;
$_SESSION['country'] = $country;
This will work:
$_SESSION['country'] = (string) $country;
----
Server IP: 64.71.164.2
Probable Submitter: 68.2.42.113
----
Manual Page -- http://www.php.net/manual/en/book.simplexml.php
Edit -- https://master.php.net/note/edit/87083
Del: integrated -- https://master.php.net/note/delete/87083/integrated
Del: useless -- https://master.php.net/note/delete/87083/useless
Del: bad code -- https://master.php.net/note/delete/87083/bad+code
Del: spam -- https://master.php.net/note/delete/87083/spam
Del: non-english -- https://master.php.net/note/delete/87083/non-english
Del: in docs -- https://master.php.net/note/delete/87083/in+docs
Del: other reasons-- https://master.php.net/note/delete/87083
Reject -- https://master.php.net/note/reject/87083
Search -- https://master.php.net/manage/user-notes.php