Q:

How to extract the URL from this XML string using C# Asp.net

I am using Imgur api to upload image from my webapp. How to extract the URL from  tag of this XML string using C# Asp.net
 <upload>
      <image>
        <name />
        <title />
        <caption />
        <hash>MkUDH</hash>
        <deletehash>kP5lIWWU0vDqrO1</deletehash>
        <datetime>2012-02-28 11:47:25</datetime>
        <type>image/jpeg</type>
        <animated>false</animated>
        <width>640</width>
        <height>480</height>
        <size>173578</size>
        <views>0</views>
        <bandwidth>0</bandwidth>
      </image>
      <links>
        <original>http://i.imgur.com/MkUDH.jpg</original>
        <imgur_page>http://imgur.com/MkUDH</imgur_page>
        <delete_page>http://imgur.com/delete/kP5lIWWU0vDqrO1</delete_page>
        <small_square>http://i.imgur.com/MkUDHs.jpg</small_square>
        <large_thumbnail>http://i.imgur.com/MkUDHl.jpg</large_thumbnail>
      </links>
    </upload>

A:

XmlDocument xml = new XmlDocument();
xml.LoadXml(myXmlString); // your XML String

XmlNodeList xnList = xml.SelectNodes("/upload/links");
foreach (XmlNode xn in xnList)
{
  string original= xn["original"].InnerText;
  string imgur_page = xn["imgur_page"].InnerText;
  string delete_page = xn["delete_page"].InnerText;
  string small_square = xn["small_square"].InnerText;
  string large_thumbnail= xn["large_thumbnail"].InnerText;

}

