Whenever i am trying to execute this code .. it overwrites my previous XML elements...
XmlDocument Doc = new XmlDocument();
XmlDeclaration dec = Doc.CreateXmlDeclaration("1.0", null, null);
Doc.AppendChild(dec);
XmlElement DocRoot = Doc.CreateElement("Feedback");
Doc.AppendChild(DocRoot);
XmlNode server = Doc.CreateElement("Message");
DocRoot.AppendChild(server);
server.InnerText = this.TextBox1.Text;
Doc.Save(Server.MapPath("mm.xml"));
Writing xml to a file.. overwriting previous data
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Suthish NairRank #93 · 22.6K pointsPosted Mar 27, 2013, 3:01 AM EDT