все эти элементы должны быть обернуты
Пример работы:
$xml_str = <<<XML
<?xml version="1.0" encoding="utf-8"?>
<script name="game">
<S time="1389634801" shop="New Moscow Shop" xy="0/-1" city="New Moscow" >
<R name="Metals" cost="1.75" need="41571" />
<R name="Gold" cost="1.1" need="437837" />
<R name="Polymers" cost="1.25" need="301096" />
<R name="Organic" cost="2.6" need="242875" />
<R name="Silicon" cost="1.3" need="909964" />
<R name="Radioactive" cost="2" need="276821" />
<R name="Gems" cost="1.6" need="489296" />
<R name="Venom" cost="0.3" need="252830" />
</S>
<S time="1389634801" shop="Berezka" xy="-1/-1" city="New Moscow" >
<R name="Metals" cost="1.8" need="27183" />
<R name="Gold" cost="1.2" need="14694" />
<R name="Polymers" cost="1.27" need="15719" />
<R name="Organic" cost="2.97" need="17164" />
<R name="Silicon" cost="1.54" need="9195" />
<R name="Radioactive" cost="2.16" need="17663" />
<R name="Gems" cost="1.5" need="17054" />
<R name="Venom" cost="0.37" need="11479" />
</S>
</script>
XML;
$xml = new SimpleXMLElement($xml_str);
echo '<pre>';
echo 'cost:' . $xml->S[0]->R[0]['cost'] . '<br>';
foreach ($xml->S[0]->R as $state => $k) {
echo "name:{$k['name']}
cost:{$k['cost']}
need:{$k['need']}
<br>";
}
В вашем случае для загрузки файла используете функцию simplexml_load_file()
файл который пытаетесь взять содержит ошибку в структуре xml файла.
как вариант можно взять данные через curl
php.net/manual/ru/book.curl.php
добавить заголовок или разобрать как html
simplehtmldom.sourceforge.net