title: Delphi - XML - childnodes - getting attributes
body: <p>I am trying to get the correct data from a twitter atom/xml feed. I have the twitter data in a txmldocument and am trying to get some specific information from it.</p>
  
  <p>Here is a truncated example of the data:</p>
  
  <pre><code>&lt;entry&gt;
    &lt;link type="text/html" rel="alternate" href="http://twitter.com/blub/statuses/1501068" /&gt; 
    &lt;title&gt;title of twitter post goes here&lt;/title&gt; 
    &lt;link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/234870532/normal.jpg" /&gt; 
  &lt;/entry&gt;
  </code></pre>
  
  <p>The problem I have is that I am trying to get the profile image url (the href attribute of the second link tag).</p>
  
  <p>If I use code like this:</p>
  
  <pre><code>i:=xmldocument1.DocumentElement.ChildNodes['entry'];
  text:=(i.ChildNodes['link'].GetAttributeNS('href',''));
  </code></pre>
  
  <p>What I get is the href value of the FIRST link tag, but I want the SECOND link tag, and I don't know exactly how to do that. Does anybody have any ideas?</p>
  
  <p>thanks.</p>