XMLDocument Class Sample

To get samples and instructions for installing them, see the following:

  • Click Samples on the Visual Studio Help menu.

    For more information, see Locating Sample Files.

  • The most recent versions and the complete list of samples are available on the Visual Studio 2008 Samples Web site.

  • You can also locate samples on your computer's hard disk. By default, samples and a Readme file are copied to a folder under \Program Files\Visual Studio 9\Samples\. For Visual Studio Express Editions, all samples are located on the Internet.

To run this sample

  • Press F5.

Demonstrates

The form is divided into three sections:

  • A list of tasks.

  • A display area for XML.

  • A display area for execution results.

All three areas are loaded and updated dynamically. Using a collection of items, rather than a series of button controls, allows you to add as many options as you like, without having to rearrange controls on the designer.

When the sample loads, it checks for the existence of three files in the \bin folder of the project folder:

  • Simple.xml

  • New.xml

  • Bad.xml

If the files exist, you will be able to choose from a set of commands loaded into a CheckedListBox control. You will need read/write permission to the \bin folder, as some of the commands require saving changes on disk.