As was said before don't use var_dump() or print_r() to see SimpleXML object structure as they do not returns always what you expect.
Consider the following:
<?php
// data in xml
$xml_txt = '
<root>
<folder ID="65" active="1" permission="1"><![CDATA[aaaa]]></folder>
<folder ID="65" active="1" permission="1"><![CDATA[bbbb]]></folder>
</root>';
// load xml into SimpleXML object
$xml = simplexml_load_string($xml_txt, 'SimpleXMLElement', LIBXML_NOCDATA);//LIBXML_NOCDATA LIBXML_NOWARNING
// see object structure
print_r($xml);
/* this prints
SimpleXMLElement Object
(
[folder] => Array
(
[0] => aaaa
[1] => bbbb
)
)
*/
// but...
foreach ($xml->folder as $value){
print_r($value);
}
/* prints complete structure of each folder element:
SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 65
[active] => 1
[permission] => 1
)
[0] => aaaa
)
SimpleXMLElement Object
(
[@attributes] => Array
(
[ID] => 65
[active] => 1
[permission] => 1
)
[0] => bbbb
)
*/
?>