title: Parsing XML after getting location using Utrace
body: <p>Hey guys well my idea is simple, I will get location information from an IP address (proxy at example) with Utrace API.</p>
  
  <p>look at this code (thanks google) </p>
  
  <pre><code>public static string GetLocation(string IP)
      {
          var location = "";
          List&lt;string&gt; HTML_code = new List&lt;string&gt;();
          WebRequest request = WebRequest.Create("http://xml.utrace.de/?query=" + IP);
          using (WebResponse response = request.GetResponse())
          using (StreamReader stream = new StreamReader(response.GetResponseStream()))
          {
              string line;
              while ((line = stream.ReadLine()) != null)
              {
                  HTML_code.Add(line);
              }
          }
          location = (HTML_code[296].Replace("&lt;td&gt;&lt;font size=\"-1\"&gt;", "")).Replace("&lt;/font&gt;&lt;/td&gt;", "");
          return location;
      }
  </code></pre>
  
  <p>OK but the output from the utrace API is the following:</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
      &lt;results&gt;
      &lt;result&gt;
      &lt;ip&gt;188.40.16.134&lt;/ip&gt;
      &lt;host&gt;&lt;/host&gt;
      &lt;isp&gt;Hetzner Online AG Pagedesign&lt;/isp&gt;
      &lt;org&gt;Hetzner Online AG Pagedesign&lt;/org&gt;
      &lt;region&gt;Koblenz&lt;/region&gt;
      &lt;countrycode&gt;DE&lt;/countrycode&gt;
      &lt;latitude&gt;50.349998474121&lt;/latitude&gt;
      &lt;longitude&gt;7.5999999046326&lt;/longitude&gt;
      &lt;queries&gt;8&lt;/queries&gt;
      &lt;/result&gt;
      &lt;/results&gt;
  </code></pre>
  
  <p>My XML skill is not the best I hope you guys can help me to edit this line:</p>
  
  <pre><code>location = (HTML_code[296].Replace("&lt;td&gt;&lt;font size=\"-1\"&gt;", "")).Replace("&lt;/font&gt;&lt;/td&gt;", "");
  </code></pre>
  
  <p>I will an output like this:</p>
  
  <pre><code>Hetzner Online AG Pagedesign : Koblenz
  </code></pre>
  
  <p>and not </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
      &lt;results&gt;
      &lt;result&gt;
      &lt;ip&gt;188.40.16.134&lt;/ip&gt;
      &lt;host&gt;&lt;/host&gt;
      &lt;isp&gt;Hetzner Online AG Pagedesign&lt;/isp&gt;
      &lt;org&gt;Hetzner Online AG Pagedesign&lt;/org&gt;
      &lt;region&gt;Koblenz&lt;/region&gt;
      &lt;countrycode&gt;DE&lt;/countrycode&gt;
      &lt;latitude&gt;50.349998474121&lt;/latitude&gt;
      &lt;longitude&gt;7.5999999046326&lt;/longitude&gt;
      &lt;queries&gt;8&lt;/queries&gt;
      &lt;/result&gt;
      &lt;/results&gt;
  </code></pre>
  
  <p>Thanks in advance for your help</p>
  
  <p>Edit:</p>
  
  <p>My new code is following:</p>
  
  <pre><code>public static void getloc(string ip)
      {
          var location = "";
          var wc = new WebClient();
         location = wc.DownloadString("http://xml.utrace.de/?query=" + ip);
         location = location.Replace("&lt;?xml version=\"1.0\" encoding=\"iso-8859-1\"?&gt;", "").Replace("&lt;results&gt;", "").Replace("&lt;result&gt;", "")
             .Replace("&lt;ip&gt;&lt;/ip&gt;", "").Replace("&lt;org&gt;&lt;/org&gt;", "").Replace("&lt;latitude&gt;&lt;/latitude&gt;", "").Replace("&lt;longitude&gt;&lt;/longitude&gt;", "").Replace("&lt;queries&gt;*&lt;/queries&gt;", "")
              .Replace("&lt;/result&gt;", "").Replace("&lt;/results&gt;", "");  
          Console.WriteLine(location);
      }
  </code></pre>
  
  <p>the output is then :</p>
  
  <pre><code>&lt;ip&gt;212.19.62.76&lt;/ip&gt;
  &lt;host&gt;1&lt;/host&gt;
  &lt;isp&gt;Plus.line AG&lt;/isp&gt;
  &lt;org&gt;ANW GmbH &amp;amp; Co. KG&lt;/org&gt;
  &lt;region&gt;Bechhofen&lt;/region&gt;
  &lt;countrycode&gt;DE&lt;/countrycode&gt;
  &lt;latitude&gt;49.150001525879&lt;/latitude&gt;
  &lt;longitude&gt;10.550000190735&lt;/longitude&gt;
  &lt;queries&gt;6&lt;/queries&gt;
  </code></pre>
  
  <p>How can I get an output like
  Plus.line AG ANW GmbH &amp; Co. KG  Bechhofen</p>
  
  <p>Greets and thanks</p>