I'm trying to read some RSS feeds with DOM in PHP like this one:
<channel>
<atom:link href='' rel='self' type='application/rss+xml' />
<title>TechStuff</title>
<link>http://www.howstuffworks.com</link>
To grab the link (<link></link>
) I use this piece of code:
$doc->getElementsByTagName('link')->item(0);
It works in all other RSS feeds that I have tried. But this one has placed <atom:link>
before <link>
, which means that it grabs <atom:link>
instead.
So how do I do to only select nodes without a namespace?