title: How to extract div tag
body: <p>I'm trying to parse a html file and I want to extract everything inside a outer div tag with a unique id. Sample:</p>
  
  <pre><code>&lt;body&gt;
    ...
    &lt;div id="1"&gt;
  
      &lt;div id="2"&gt;
      ...
      &lt;/div&gt;
  
      &lt;div id="3"&gt;
      ...
      &lt;/div&gt;
  
    &lt;/div&gt;
    ...
  &lt;/body&gt;
  </code></pre>
  
  <p>Here I want to extract every thing in between <code>&lt;div id="1"&gt;</code> and its corresponding <code>&lt;/tag&gt;</code> NOT the first <code>&lt;/div&gt;</code> tag.</p>
  
  <p>I've gone through many older posts but they don't work because they stop when they see the first <code>&lt;/div&gt;</code> tag which is not what I'm looking for.</p>
  
  <p>Any pointer would be appreciated.</p>