title: Extract all divs containing specific keywords using XPath/HTML Agility Pack
body: <p>I try to extract data from an html(-->xml)-document (below) using the HTML Agility Pack. The "<code>div</code>"s that contain "<code>id=dealId_*****</code>"  are relevant. I think I know how to proceed, when I figure out how to just count all "<code>div</code>"s with "<code>id=dealId_*****</code>". I tried using the XPath-Method "<code>starts-with</code>", but it didn't work:</p>
  
  <pre><code>HtmlDocument doc = new HtmlDocument();
  doc.LoadHtml(Sourcecode);
  
  int numberOfDIVs;
  numberOfDIVs = doc.DocumentNode.SelectNodes("//*[@id='jLocalDeals']/*[starts-with(@id, 'dealId_']").Count;
  
      &lt;div id="jLocalDeals" class="dealsBlock" style=""&gt;
      &lt;h1&gt;
      &lt;div id="dealId_5474417" class="jDeal LEISURE_OFFERS"&gt;
      &lt;div id="dealId_5476688" class="jDeal SHOPPING"&gt;
      &lt;div id="dealId_5445019" class="jDeal TICKETS1 RESTAURANT1"&gt;
      &lt;div class="wrapper3Deals"&gt;&lt;/div&gt;
      &lt;div id="dealId_5474286" class="jDeal BEAUTY"&gt;
      &lt;div id="dealId_5476685" class="jDeal LEISURE_OFFERS"&gt;
      &lt;div id="dealId_5474466" class="jDeal SERVICES"&gt;
      &lt;div class="wrapper3Deals"&gt;&lt;/div&gt;
      &lt;div id="dealId_5466810" class="jDeal BEAUTY"&gt;
      &lt;div id="dealId_5425417" class="jDeal SERVICES"&gt;
      &lt;div id="dealId_5474329" class="jDeal SHOPPING"&gt;
      &lt;div class="wrapper3Deals"&gt;&lt;/div&gt;
      &lt;div id="dealId_5476703" class="jDeal SHOPPING"&gt;
      &lt;div id="dealId_5476729" class="jDeal SHOPPING"&gt;
      &lt;div id="dealId_5474702" class="jDeal HEALTHCARE"&gt;
      &lt;div class="wrapper3Deals"&gt;&lt;/div&gt;
      &lt;div id="dealId_5444044" class="jDeal TRAVEL1" style="display: block;"&gt;
      &lt;div id="dealId_5474444" class="jDeal LEISURE_OFFERS" style="display: block;"&gt;
      &lt;div id="dealId_5473774" class="jDeal TRAVEL1" style="display: block;"&gt;
      &lt;div class="wrapper3Deals"&gt;&lt;/div&gt;
      &lt;/div&gt;  
  </code></pre>
  
  <p>P.S.: Unfortunately I am only able to use .NET 2.0.</p>