Quantcast
Viewing latest article 3
Browse Latest Browse All 5

javascript getElementsByTagName exclude certain tags

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 latest article 3
Browse Latest Browse All 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>