Saturday, May 30, 2009

Remove XML comments

// Remove XML comments

XmlNodeList list = xmlDoc.SelectNodes("//comment()");
foreach(XmlNode node in list)
node.ParentNode.RemoveChild(node);

No comments:

Post a Comment