How to get attribute from a <link tag in pure javascript?
<pre><code>&lt;link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.blogger.com/rsd.g?blogID=7487871339000666216" /&gt;
</code></pre>

<p>How can I get the href attribute of this link tag without using any javascript library?</p>

<p>Right now I'm using the code below to achieve this but I want to know whether there is a simpler solution.</p>

<pre><code>var links = document.getElementsByTagName("link");
for (i in links){
    var title = links[i].getAttribute("title");
    if ( title == "RSD"){
        var href = links[i].getAttribute("href");
        break;
    }
}
</code></pre>
