Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. editing XML config file from within executing program

editing XML config file from within executing program

Scheduled Pinned Locked Moved Visual Basic
xmlquestionannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vineet Rajan
    wrote on last edited by
    #1

    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

    U 1 Reply Last reply
    0
    • V Vineet Rajan

      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

      U Offline
      U Offline
      User 903410
      wrote on last edited by
      #2

      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

      V 1 Reply Last reply
      0
      • U User 903410

        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

        V Offline
        V Offline
        Vineet Rajan
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups