XElement.ReplaceAttributes (Object[]) replaces attributes with the specified content.
Imports System Imports System.Xml Imports System.Xml.XPath Public Class MainClass Public Shared Sub Main() Dim root As XElement = <Root Att1="1" Att2="2" Att3="3"/> root.ReplaceAttributes( _ New XAttribute("NewAtt1", 101), _ New XAttribute("NewAtt2", 102), _ New XAttribute("NewAtt3", 103)) Console.WriteLine(root) End Sub End Class