Only select nodes without a namespace/prefix in PHP DOM?

sluon118

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