Quantcast
Channel: Active questions tagged atom-feed+rss+parsing - Stack Overflow
Viewing all articles
Browse latest Browse all 13

javascript getElementsByTagName exclude certain tags

$
0
0

In my project I'm trying to parse rss & atom feeds. I target each feed's link with this:

var feedLink = source.getElementsByTagName('link')[0];

Some feeds start directly with

<link>http://www.url.com</link>

but some start like this:

<atom:link href="http://www.url.com/feed/" rel="self" type="application/rss+xml" />
<link>http://www.url.com</link>

and the selector I'm using targets also the link tags that starts with atom: Is there a way to avoid them ?

Thanks


Viewing all articles
Browse latest Browse all 13

Latest Images

Trending Articles



Latest Images