The XML I am reading looks like this:
The Big Bang Theory http://www.tvrage.com/The_Bi
This should work. You need to use attributes with type (if sting value use (string))
$id = (string) $xml->show->attributes()->id; var_dump($id);
Or this:
$id = strip_tags($xml->show->attributes()->id); var_dump($id);