title: How to get nested div using Xpath?
body: <p>I need to get a nested div with an html document, for example:</p>
  
  <pre><code>&lt;div id="maindiv&gt;
      &lt;div id='firstdiv'&gt;
      &lt;/div&gt;  
      &lt;div id="otherid"&gt;
          &lt;div id="anotherdiv"&gt;&lt;div id="divid"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need to get the content of <code>anotherdiv</code>. I don't know how deep both <code>maindiv</code> might be within the main document and how deep <code>anotherdiv</code> might be within <code>maindiv</code>.</p>
  
  <p>Currently I'm doing:</p>
  
  <pre><code>var doc = new HtmlAgilityPack.HtmlDocument();
  doc.LoadHtml(content);
  
  var main = doc.GetElementbyId("maindiv").InnerHtml;
  doc.LoadHtml(main);
  
  var another = doc.GetElementbyId("anotherdiv");
  </code></pre>
  
  <p>This works fine. However is there a better way to get the required div by using XPath?</p>