How to save a copy of XML file when performing any operation on it?

synseal

New Member
I am crating a VB6 application. What it does is that it reads information from an XML file and then copies a particular file to my local workstation. \[code\]<ArrayOfMediaFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">- <MediaFile> <fileName>Default.jpg</fileName> <filePath>C:\Program Files\media</filePath> <dateModified>2012-04-30T14:41:28.6893988-05:00</dateModified> <Action>Add</Action> </MediaFile>- <MediaFile> <fileName>icon.jpg</fileName> <filePath>C:\Program Files\media</filePath> <dateModified>2012-04-30T15:43:31.2995396-05:00</dateModified> <Action>Add</Action> </MediaFile>- </ArrayOfMediaFile>\[/code\]The XML looks something like this. Now my application reads the file name and if the action node is "add" it copies the file and coverts the action node to "keep".The ProblemWhat i wish to do now is to save this file after every operation. And if while saving the XML there is any error then i should be able to make a copy of the XML which i can again use in the operation.
 
Back
Top