public RemoveProjectExtensions ( string section ) : void | ||
section | string | |
return | void |
public void RemoveProjectExtensions (string section)
{
XmlElement elem = doc.DocumentElement.SelectSingleNode ("tns:ProjectExtensions/tns:" + section, XmlNamespaceManager) as XmlElement;
if (elem != null) {
XmlElement parent = (XmlElement) elem.ParentNode;
parent.RemoveChild (elem);
if (!parent.HasChildNodes)
parent.ParentNode.RemoveChild (parent);
}
}
}