IService: [ServiceContract] public interface IService1 { [OperationContract] void InsertData(Student st); [OperationContract] void UpdateData(Student su); } Service.cs: public void InsertData(Student st) { XDocument doc = XDocument.Load(HttpContext.Current.Server.MapPath("StudentDB.xml")); doc.Element("Students").Add( new XElement("student", new XAttribute("name", st.name), new XAttribute("number", st.number) ); doc.Save(HttpContext.Current.Server.MapPath("StudentDB.xml")); } public void UpdateData(Student su) { XDocument doc = XDocument.Load(HttpContext.Current.Server.MapPath("StudentDB.xml")); var up=doc. }
How can i update data into xml?
anilbabu