Removes the XmlAttribute specified by the local name and namespace URI.
using System; using System.IO; using System.Xml; public class Sample { public static void Main() { XmlDocument doc = new XmlDocument(); doc.LoadXml("<book xmlns:bk='urn:samples' bk:ISBN='1-111111-11-1'>" + "<title>C#</title>" + "</book>"); XmlElement root = doc.DocumentElement; root.RemoveAttributeNode("ISBN", "urn:samples"); Console.WriteLine(doc.InnerXml); } }