April 2002
Intermediate to advanced
416 pages
11h 50m
English
After you make changes to the data loaded from an XML file either manually or programmatically, you may want to save the changes back into the XML file. Example program EditXml is similar to program ReadXml except it allows you to save changes to a modified XML file.
Example program EditXml uses the code in Listing 7.8 to display XML data and save changes. The heart of the program is the DataSet object’s WriteXml method, which saves data into an XML file. To ensure that no changes are lost, however, program EditXml must do more than simply calling WriteXml.
When the user selects the File menu’s Open command, the program’s mnuFileOpen_Click event handler calls the DataSafe function. DataSafe returns True if ...
Read now
Unlock full access