XAttribute.Remove removes this attribute from its parent element.
Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim root As XElement = <Root Att1="content1" Att2="content2" Att3="content3"/>
Dim att As XAttribute = root.Attribute("Att2")
att.Remove()
Console.WriteLine(root)
End Sub
End Class