editing XML config file from within executing program
-
hi i am writing an application which maintains records of several clients. Each client has different settings. This is maintained in a XML file. When the user wants to update the data of a particular client changes have for that client. this is what my XML document looks like. 222.23.342.1 2222 c:\ 4 4 Custom 1200 1024 222.23.432.23 3333 d:\ 5 5 4 High 222.23.43.4323 5555 e:\ 10 1 4 Low 223.533.456.234 54334 e:\hello 10 45 4 Low 223.533.456.234 5433 d:\vineet 10 45 4 High say i want to edit the settings for ICICI, how do i do from within the executing program. please give proper code. Thanks
-
hi i am writing an application which maintains records of several clients. Each client has different settings. This is maintained in a XML file. When the user wants to update the data of a particular client changes have for that client. this is what my XML document looks like. 222.23.342.1 2222 c:\ 4 4 Custom 1200 1024 222.23.432.23 3333 d:\ 5 5 4 High 222.23.43.4323 5555 e:\ 10 1 4 Low 223.533.456.234 54334 e:\hello 10 45 4 Low 223.533.456.234 5433 d:\vineet 10 45 4 High say i want to edit the settings for ICICI, how do i do from within the executing program. please give proper code. Thanks
Dim ds As New DataSet Private Sub btnGetData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetData.Click ds = New DataSet ds.ReadXml("c:\test.xml") DataGrid1.DataSource = ds End Sub Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click ds.WriteXml("c:\test.xml") End Sub
-
Dim ds As New DataSet Private Sub btnGetData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetData.Click ds = New DataSet ds.ReadXml("c:\test.xml") DataGrid1.DataSource = ds End Sub Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click ds.WriteXml("c:\test.xml") End Sub
thanks this worked for me but only one thing, can i do this without the DataGrid. i know it is a bit more complicated but that would be really better