Instead of repeating this string in every example, we put it into a file which we include in each example.
This included file is shown in the following example section.
This accepts xml strings, * files, and DOM objects.
It can also perform the reverse, converting * an Simple XMLElement back into a string, file, or DOM object.
On a var_dump of $xml_node, a  element was shown as the string '12'.
However, $xml_node was evaluating NULL in 5.2.0.
You can see below the code change I made, pulling my data out of the raw XML with a regular expression.
Hope this is useful to someone.//In some versions of PHP it seems we cannot access the  element of a Simple XML Object.
* Note that you can also pass a string * to change the default index. * @param boolean|string $children Key if you pass TRUE, all values will be * stored under an '@children' index.
* Note that you can also pass a string * to change the default index. * @param boolean|string $value Key if you pass TRUE, all values will be * stored under an '@values' index. */ You will get something like: Notice: Trying to get property of non-object in /Applications/MAMP/htdocs/mysite/on line 10However, this WILL work and is much simpler then using (string) or other methods. In regexp max length is 6 becouse I found that is the maximum length of possible html entity using this code: Storing Simple XMLElement values in $_SESSION does not work.
here is an example array converted from an xml file: array( "@tag"= Here's a quick way to dump the node Values from Simple XML into an array using the path to each node Value as key. in code that doesn't know about the underlying xml).
Then I use DOMXPath to find the node containing the original value and update it.
This isn't handy and makes the search less useful.