title: Logic for Implementing a Dynamic Web Scraper in C#
body: <p>I am looking to develop a Web scraper in C# window forms.  What I am trying to accomplish is as follows:</p>
  
  <ol>
  <li>Get the URL from the user.</li>
  <li>Load the Web page in the IE UI control(embedded browser) in WINForms.</li>
  <li>Allow the User to select a text (contiguous , small(not exceeding 50 chars)). from the loaded web page.</li>
  <li>When the User wishes to persist the location (<strong>the HTML DOM location</strong>)  it has to be persisted into the DB, so that the user may use that location to fetch the data in that location during his subsequent visits.</li>
  </ol>
  
  <p>Assume that the loaded website is a pricelisting site and the quoted rate keeps on changing, the idea is to persist the DOM hierarchy so that I can traverse it next time. </p>
  
  <p>I would be able to do this if all the HTML elements had their id attributes. In the case where the id is null , i am not able to accomplish this .</p>
  
  <p>Could someone suggest a valid idea on this (a bare minimum code snippet if possible).?</p>
  
  <p>It would be helpful , even if you can share some online resources. </p>
  
  <p>thanks,</p>
  
  <p>vijay</p>