I have a xml file that looks like this:
<item>
<title>Lore ipsum etc </title>
<description>lorem ipsum etc etc</description>
<link>http://url.com</link>
<guid isPermaLink="false">http://url.com</guid>
<pubDate>Sat, 27 Apr 2013 14:56:50 GMT</pubDate>
<media:thumbnail width="66" height="49" url="http://url.com/media/images/67275000/jpg/_67275945_017846423.jpg" />
<media:thumbnail width="144" height="81" url="http://http://url.com/media/images/67276000/jpg/_67276200_017846423.jpg" />
</item>
<item>
<title>Lore ipsum etc </title>
<description>lorem ipsum etc etc</description>
<link>http://url.com</link>
<guid isPermaLink="false">http://url.com</guid>
<pubDate>Sat, 28 Apr 2013 14:56:50 GMT</pubDate>
<media:thumbnail width="66" height="49" url="http://url.com/media/images/67275000/jpg/_67275945_017846423.jpg" />
<media:thumbnail width="144" height="81" url="http://http://url.com/media/images/67276000/jpg/_67276200_017846423.jpg" />
</item>
the list have around 50 items.
How can I give my variables the value that is inside <title>
, <description>
, <link>
and <PubDate>
.
I have done this so far:
url = "http://url.com/file.xml";
XmlDocument doc = new XmlDocument();
doc.Load(url);
Any kind of help is appreciated