This is similar to a question I\'ve posted, but I\'ve broadened out as this has got to be solvable.
I am trying to access rating and viewCount from this rss feed. No
Using DomDocument and DomXpath:
error_reporting(E_ALL ^ E_STRICT);
ini_set('display_errors', 'on');
$dom = new DomDocument;
$dom->load('data.xml');
$xpath = new DomXpath($dom);
$xpath->registerNamespace('atom', 'http://www.w3.org/2005/Atom');
$xpath->registerNamespace('media', 'http://search.yahoo.com/mrss/');
$xpath->registerNamespace('gd', 'http://schemas.google.com/g/2005');
$xpath->registerNamespace('yt', 'http://gdata.youtube.com/schemas/2007');
$favoriteCountAttr = $xpath->query('/atom:entry/yt:statistics/@favoriteCount')->item(0);
if ($favoriteCountAttr instanceof DomAttr) {
echo $favoriteCountAttr->nodeValue; // output: 10
}