XAttribute.SetValue sets the value of this attribute.
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.SetValue("new content") Console.WriteLine(root) End Sub End Class