Loads the XML document from the specified string.
Imports System
Imports System.Xml
public class Sample
public shared sub Main()
Dim doc as XmlDocument = new XmlDocument()
doc.LoadXml("<item><name>A</name></item>")
Dim newElem as XmlElement = doc.CreateElement("price")
newElem.InnerText = "10.95"
doc.DocumentElement.AppendChild(newElem)
Dim writer as XmlTextWriter = new XmlTextWriter("data.xml",nothing)
writer.Formatting = Formatting.Indented
doc.Save(writer)
end sub
end class
Related examples in the same category