linq to xml return second element

Posted by Phil on Stack Overflow See other posts from Stack Overflow or by Phil
Published on 2010-04-27T20:57:38Z Indexed on 2010/04/27 21:03 UTC
Read the original article Hit count: 172

Filed under:
|

Hi

Im trying to return to the second element in the xml from flickr.

This always returns the first element:

ImageUrl = item.Element(ns + "link").Attribute("href").Value,

and this errors?

ImageUrl = item.Elements(ns + "link")[1].Attribute("href").Value,

Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about linq-to-xml