title: How to remove all comment tags from XmlDocument
body: <p>How would i go about to remove all comment tags from a XmlDocument instance?</p>
  
  <p>Is there a better way than retrieving a XmlNodeList and iterate over those?</p>
  
  <pre><code>
      XmlNodeList list = xmlDoc.SelectNodes("//comment()");
  
      foreach(XmlNode node in list)
      {
          node.ParentNode.RemoveChild(node);
      }
  </code></pre>