Worked like a charm.. Can you provide me with some links where I can learn about this technique more..??
Because I'll be needing to do many such fetching for my app..
What about this?
using System.Linq; using System.Xml.Linq; namespace DW_418207_CS_CON { class Program { static void Main(string[] args) { XDocument doc = XDocument.Load("../../XmlFile1.xml"); string strLink = ( from x in doc.Descendants().First().Elements() where x.Name.LocalName.Equals("link") && x.Attribute("rel").Value.Contains("resumable-create-media") select x.Attribute("rel").Value ).FirstOrDefault(); System.Diagnostics.Debug.WriteLine(strLink); } } }
It looks like (and I assumed) "entry" is nested inside "feed".
If you want all of the links, it would not be too hard to modify the query to bring back a List<string>.