Home > Articles > Web Services > XML

  • Print
  • + Share This
From the author of

XML

There are many formats in which you can save a program's session state. You can use a list of parameter name and value pairs, an INI file format, or fields in a database table. Program Restore saves its settings in XML (extensible markup language). Any of these formats would work, but XML provides some standardization and is easy to use. XML's hierarchical format also maps naturally to an application that contains forms, each containing its own parameters.

Just as there are many formats you can use to save the session state, there are many places you can store it. You can store it in a text file named after the user and placed in the user's current directory or in a directory shared across the network. You can store it in a database. Shared directories and databases are particularly effective when users are likely to move from one computer to another. Because the files are shared, each user gets his own configuration, no matter which computer he is using.

Program Restore saves and restores its settings in the system Registry. That prevents users from getting their own configurations when they move from one computer to another, but it's very easy and good enough for this example.

  • + Share This
  • 🔖 Save To Your Account