- var_dump: documentation ( source)
<?php
$html = <<<EOF
<html>
<head>
<link href='http://wendyandgabe.blogspot.com/favicon.ico' rel='icon' type='image/x-icon'/>
<link href='http://wendyandgabe.blogspot.com/' rel='canonical'/>
<link rel="alternate" type="application/atom+xml" title="O' Happy Day! - Atom" href="http://wendyandgabe.blogspot.com/feeds/posts/default" />
<link rel="alternate" type="application/rss+xml" title="O' Happy Day! - RSS" href="http://wendyandgabe.blogspot.com/feeds/posts/default?alt=rss" />
<link rel="service.post" type="application/atom+xml" title="O' Happy Day! - Atom" href="http://www.blogger.com/feeds/5390468261501503598/posts/default" />
</head>
<body>
</body>
</html>
EOF;
$xml = new DomDocument;
$xml->loadXML($html);
//create a xpath instance
$xpath = new DomXpath($xml);
//query for <sub name="Y"> and use the first found item
$link = $xpath->query('//link[@type="application/rss+xml"]')->item(0);
var_dump($link);