Changeset 954 for trunk/src/update_imadoc.m
- Timestamp:
- Jun 22, 2016, 1:36:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/update_imadoc.m
r924 r954 34 34 testappend=1; 35 35 backupfile=outputfile; 36 testexist=2;37 while testexist==238 backupfile=[backupfile '~'];39 testexist=exist(backupfile,'file');40 end41 [success,message]=copyfile(outputfile,backupfile);%make backup42 if success~=143 errormsg=['errror in xml file backup: ' message];44 return45 end46 36 t=xmltree(outputfile); %read the file 47 37 title=get(t,1,'name'); 48 38 if strcmp(title,'ImaDoc') 49 testappend=1; 39 % testappend=1; 40 %rename the existing file for backup 41 testexist=2; 42 while testexist==2 43 backupfile=[backupfile '~']; 44 testexist=exist(backupfile,'file'); 45 end 46 [success,message]=movefile(outputfile,backupfile);%make backup 47 if success~=1 48 errormsg=['errror in xml file backup: ' message]; 49 return 50 end 50 51 %if the xml file is ImaDoc 51 52 uid_calib=find(t,['ImaDoc/' StructName]);
Note: See TracChangeset
for help on using the changeset viewer.