title: Removing HtmlElement objects programmatically using C#
body: <p>In a <code>WebBrowser</code> control, how do I remove <code>HtmlElement</code> objects?  There are no methods in the <code>HtmlElement</code> class to accomplish this.  As a workaround, I can create a "dummy" <code>HtmlElement</code> (without inserting it into the <code>HtmlDocument</code>), into which I then insert (via <code>AppendChild</code>) the <code>HtmlElement</code> objects to be removed.  This feels like a hack.  Is there a better way to do this?</p>
  
  <p>P.S. I want to retain the <code>HtmlElement</code> in memory to be used later, not simply destroy it (which is what setting its parent's <code>innerHtml</code> to an empty string would do)</p>