Concerning SimpleXML and sessions:
When creating a SimpleXML object (to be precise: a SimpleXMLElement object) in the context of a session and storing it in $_SESSION['XMLobject'], this object does not "survive" the session!
By the time re-entering the session, print_r($_SESSION['XMLobject']) says:
['XMLobject'] => SimpleXMLElement Object
Warning: Node no longer exists in /your_php_file.php on line xyz
(
)
(Message simplified for the sake of better readability.)