title: HtmlAgilityPack C#: Remove node with with all childerns
body: <p>I have html document and I want to remove "form" tag with all its child element.</p>
  
  <pre><code>        var nodeCollection = doc.DocumentNode.SelectNodes(".//form");
          int attributeRemoveCount = 0;
  
          if (nodeCollection != null)
          {
              foreach (HtmlNode link in nodeCollection)
              {
                  link.Remove();
              }
          }
  </code></pre>
  
  <p>my html is similar to </p>
  
  <pre><code>&lt;form name="LPHitCountForm"&gt;
    &lt;input type="hidden" name="LPHitCount" value="0"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Above code just remove "" this line from html.
  below tags are remain same.
  Hence final html becomes as below.</p>
  
  <pre><code>  &lt;input type="hidden" name="LPHitCount" value="0"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have tried RemoveAll function also but is not working.
  Is there any other way ?</p>