Imports System
Imports System.IO
Imports System.Xml
publicclass Sample
public shared sub Main()
Dim doc as XmlDocument = new XmlDocument()
doc.LoadXml("<book xmlns:bk='urn:samples' bk:ISBN='1-111111-57-5'>" & _
"<title>C#</title>" & _
"</book>")
Dim root as XmlElement = doc.DocumentElement
Dim attr as XmlAttribute = root.SetAttributeNode("genre", "urn:samples")
attr.Value="Computer"
Console.WriteLine(doc.InnerXml)
end sub
end class