Your method wasnt posted, but you could use System.XML for it. In addition, you might want to make sure your web server allows you to write with the user you are using.
Thanks for your advice it helped I used this method to update.Can you say if there is anything wrong in it(It works fine but still any
problem in code ?).
My Xml File
__________________________________________________ ________________
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="Employee.xsl" ?>
<Employee_details>
<Employee id="1">
<Employee_Name>Anderson</Employee_Name>
<Employee_JobId>250</Employee_JobId>
<Employee_JoiningDate>1/15/2007(January 15 2007)</Employee_JoiningDate>
<Employee_Jobsection>Accounts</Employee_Jobsection>
</Employee>
<Employee id="2">
<Employee_Name>
Krishna
</Employee_Name>
<Employee_JobId>
255
</Employee_JobId>
<Employee_JoiningDate>
1/5/2007(January 5 2007)
</Employee_JoiningDate>
<Employee_Jobsection>
Accounts
</Employee_Jobsection>
</Employee>
<Employee id="3">
<Employee_Name>John</Employee_Name>
<Employee_JobId>260</Employee_JobId>
<Employee_JoiningDate>2/5/2007(February 5 2007)</Employee_JoiningDate>
<Employee_Jobsection>Maintainence</Employee_Jobsection>
</Employee>
<Employee id="4">
<Employee_Name>
Siddharth
</Employee_Name>
<Employee_JobId>
265
</Employee_JobId>
<Employee_JoiningDate>
2/8/2007(February 8 2007)
</Employee_JoiningDate>
<Employee_Jobsection>
Software
</Employee_Jobsection>
</Employee>
<Employee id="5">
<Employee_Name>Ethen</Employee_Name>
<Employee_JobId>270</Employee_JobId>
<Employee_JoiningDate>1/1/2007(January 1 2007)</Employee_JoiningDate>
<Employee_Jobsection>Finance</Employee_Jobsection>
</Employee>
</Employee_details>
__________________________________________________ ________________
And Update Code Part is as follows
__________________________________________________ ________________
If btnUpdate.Text = "Save" Then
AddNewNode()
End If
Dim xDoc As New XmlDocument
Dim rootElement As XmlElement
Dim xElement As XmlElement
Dim xElementValue As XmlElement
Dim count As Integer
Dim xmlId As String = Session("xmlIdVal")
xDoc.Load(Server.MapPath("Employee.xml"))
rootElement = xDoc.DocumentElement
xElement = rootElement.FirstChild
Dim elementCount As Integer = rootElement.ChildNodes.Count
For count = 0 To elementCount
If xElement.GetAttribute("id") <> xmlId Then
xElement = xElement.NextSibling
Else
count = elementCount
End If
Next
'Assign the values in the textboxes
'Update the elements using Innertext & InnerXml
'Updating first element-->
'EmployeeName
xElementValue = xElement.Item("Employee_Name")
xElementValue.InnerText = txtEmployeeName.Text
xElementValue.InnerXml = txtEmployeeName.Text
'JoiningDate
xElementValue = xElement.Item("Employee_JoiningDate")
xElementValue.InnerText = txtJoiningDate.Text
xElementValue.InnerXml = txtJoiningDate.Text
'JobId
xElementValue = xElement.Item("Employee_JobId")
xElementValue.InnerText = txtJobId.Text
xElementValue.InnerXml = txtJobId.Text
'Jobsection
xElementValue = xElement.Item("Employee_Jobsection")
xElementValue.InnerText = txtJObSection.Text
xElementValue.InnerXml = txtJObSection.Text
'Save the xml-File in reqd loaction
Dim XmlFilePathLocation As String
XmlFilePathLocation = Request.PhysicalApplicationPath
xDoc.Save(XmlFilePathLocation + "Employee.xml")
'Show the Updated XmlFile Values
Response.Redirect("Employee.xml")
__________________________________________________ ________________
Pls check and tell me if there is some prob. I am using Vb.Net
Thanks in advance -- bye Paulson