In case you have a XML file with a series of equally named elements on one level simplexml incorrectly processes them and doesn't allow to walk through the array using foreach(). As far as I'm concerned, it is the problem caused by PHP xml_parser (see: http://ru2.php.net/manual/ru/function.xml-parser-create.php#53188).
To avoid this, just use count() and walk through the array using for().
Example:
<params>
<param>
<name>version.shell</name>
<value>1.0</value>
</param>
<param>
<name>version.core</name>
<value>1.0</value>
</param>
<param>
<name>file.lang</name>
<value>vc.lang</value>
</param>
...
</params>
<?php
$filename = '...';
$xml = simplexml_load_file($filename);
$p_cnt = count($xml->param);
for($i = 0; $i < $p_cnt; $i++) {
$param = $xml->param[$i];
...;
}
?>