Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving to xml file

Status
Not open for further replies.
Aug 1, 2005
25
US
Hi

My xml shows as follows
in asp.net

Dim xml As New XmlDocument
xml.Load(Server.MapPath("xmlList.xml"))
Dim xNode As XmlNode
xNode = xml.SelectSingleNode("grub/pizza")
Dim xElem As XmlElement
xElem = xml.CreateElement("topping")
xElem.InnerText = "cheese "
xNode.AppendChild(xElem)

Label1.Text = xml.InnerXml

xNode.RemoveChild(xNode.ChildNodes(1))

Label2.Text = xml.InnerXml

Everything flows fine, but how can I update my xml file properly?

Many thanks!

 
xml.Save(Server.MapPath("xmlList.xml"))

I would name the variable xml to Myxml so it does not get confused with the name space "Xml
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top