Imports System
Imports System.Xml
publicclass Sample
public shared sub Main()
Dim doc as XmlDocument = new XmlDocument()
doc.LoadXml("<book>" & _
" <title>C#</title>" & _
" <price/>" & _
"</book>")
Dim currNode as XmlElement
currNode = CType (doc.DocumentElement.LastChild, XmlElement)
if (currNode.IsEmpty)
currNode.InnerXml="9.9"
end if
Console.WriteLine(doc.OuterXml)
end sub
end class