The XML I am reading looks like this:
The Big Bang Theory
http://www.tvrage.com/The_Bi
You need to format your XML
properly and let it have examply using <root></root>
or <document></document>
anything .. see XML specification and examples at http://php.net/manual/en/function.simplexml-load-string.php
$xml = '<?xml version="1.0" ?>
<root>
<show id="8511">
<name>The Big Bang Theory</name>
<link>http://www.tvrage.com/The_Big_Bang_Theory</link>
<started>2007-09-24</started>
<country>USA</country>
<latestepisode>
<number>05x23</number>
<title>The Launch Acceleration</title>
</latestepisode>
</show>
</root>';
$xml = simplexml_load_string ( $xml );
var_dump ($xml->show->attributes ()->id);