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>.
thines01
Postaholic
2,433 posts since Oct 2009
Reputation Points: 447
Solved Threads: 408
Skill Endorsements: 7
Well, if you search on LINQ to Xml, you will find lots of resources.
Once you know the structure, you can just guess at the code :)
thines01
Postaholic
2,433 posts since Oct 2009
Reputation Points: 447
Solved Threads: 408
Skill Endorsements: 7
thines01
Postaholic
2,433 posts since Oct 2009
Reputation Points: 447
Solved Threads: 408
Skill Endorsements: 7