Results 1 to 2 of 2

Thread: Storing / Reading / Updating an XML file

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2007
    Posts
    159

    Question Storing / Reading / Updating an XML file

    I have an application that gathers data from a SQL database that is used by a 3rd party helpdesk application.

    My application is pulling out information of the number of hours worked by each engineer for the current and previous 2 months.

    Also as part of this process, my application works out the target hours for each of those months.

    My application has 3 groupboxes whose label is generated at runtime.

    My application gives the Groupbox1.text the name of the current month, Groupbox2.text the name of the previous month, and Groupbox3.text the name of the month before that (e.g. Mar, Feb, Jan).

    What I am trying to do is have 2 text boxes for each month where I can enter the number of engineer holidays taken and the number of public holidays if any. I want to store these values in an XML file, and I guess they need to be stored to match the Groupbox text (i.e. Mar, Feb, Jan).

    When the application starts, I need to parse that XML file and re-populate the text boxes with those number of days - BUT if the month has moved on, so that the Groupboxes are now called Apr, Mar, Feb then I want the Mar and Feb data to be loaded, and I want the XML file to be updated so that Apr is added and Jan is removed from it.

    I want the XML file to keep the current and previous two months figures only.

    Can anyone provide me with a code example of how to do this?

    Thanks
    If my post helped you, please rate it. Thanks.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: Storing / Reading / Updating an XML file

    have a look at this:
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width