<?xml version=“1.0“ encoding=“utf-8“?><Items><Item><ItemId>3</ItemId><ProductName>Pine Apple</ProductName><Price>30 $</Price><Item><Items>
Dim XMLDoc As New XmlDocumentXMLDoc.Load(Server.MapPath("MyData.xml"))Dim XEle As XmlElement = XMLDoc.CreateElement("Item")Dim XTxt As XmlText'XMLDoc.DocumentElement.AppendChild(XEle)XEle = XMLDoc.CreateElement("ItemID")XTxt = XMLDoc.CreateTextNode("3")XMLDoc.DocumentElement.AppendChild(XEle)XMLDoc.DocumentElement.LastChild.AppendChild(XTxt)XEle = XMLDoc.CreateElement("ProductName")XTxt = XMLDoc.CreateTextNode("Meera")XMLDoc.DocumentElement.AppendChild(XEle)XMLDoc.DocumentElement.LastChild.AppendChild(XTxt)XEle = XMLDoc.CreateElement("Price")XTxt = XMLDoc.CreateTextNode("50 $")XMLDoc.DocumentElement.AppendChild(XEle)XMLDoc.DocumentElement.LastChild.AppendChild(XTxt)XMLDoc.Save(Server.MapPath("MyData.xml"))
Tags: XML-Aspnet
asp.net
Related posts
Comments
Saving Marriage , on 12/17/2009 2:56:24 AM Said:
Thanks for the XML tips. It gives me hope. I don't want to be in despair all long as I have the initiative to achieve my dreams. Great blog of yours. Thanks for the wisdom.
Add comment
Try, Strive and Struggle are the keys of my hope. When there is no hope, no success. So keep hoping and keep winning. No idea how true that statement is, as I myself is losing the biggest hope of mine. So do it on your own risk :)