Mega Code Archive

 
Categories / VB.Net / XML
 

Saves the XML document to the specified file

Imports System Imports System.Xml public class Sample    public shared sub Main()      Dim doc as XmlDocument = new XmlDocument()     doc.LoadXml("<item><name>wrench</name></item>")     Dim newElem as XmlElement = doc.CreateElement("price")     newElem.InnerText = "10.95"     doc.DocumentElement.AppendChild(newElem)     doc.PreserveWhitespace = true     doc.Save("data.xml")   end sub end class