title: HTML Scraping with HTML Agility Pack
body: <p>Can some one tell me the best way to get the contents using HTMLAgilityPack that i mention below from the html.</p>
  
  <p>In the HTML provided i need to scrape <code>value</code> of the ID "img" and set the values for <code>x</code> and <code>y</code> for them to be used in another function.</p>
  
  <p>The relevant HTML is </p>
  
  <pre><code>&lt;div id="values"&gt;
  &lt;input type="hidden" id="x" name="x" value='0' /&gt;
  &lt;input type="hidden" id="y" name="y" value='0' /&gt;
  &lt;input type="hidden" id="img" name="img" value="86932" /&gt;
  &lt;input type="hidden" id="source" name = "source" value="center" /&gt;
  </code></pre>
  
  <p>These values are being sent to the function in the javascript displayed below</p>
  
  <pre><code>submitClick(document.getElementById("img").getAttribute("value"), 
                document.getElementById("x").getAttribute("value"), 
                document.getElementById("y").getAttribute("value"), 
                'tiled'  );
  </code></pre>
  
  <p>Can some body help me out by telling how i should proceed ...</p>
  
  <p>I have written the following code that gets me the html data for the page </p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
  request.Method = "GET";
  using (var stream = request.GetResponse().GetResponseStream())
  using (var reader = new StreamReader(stream, Encoding.UTF8))
  {
      result = reader.ReadToEnd();
  }
  HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
  doc.Load(new StringReader(result));
  HtmlNode root = doc.DocumentNode;
  </code></pre>
  
  <p>Now that i have got the root how should i search for the parameters and then send them by GET.</p>