Changeset 248 for trunk/src/editxml.m
- Timestamp:
- May 9, 2011, 12:32:20 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/editxml.m
r180 r248 330 330 head_name=get(t,1,'name'); 331 331 %Path to shemas: 332 %path_uvmat=which('editxml');% check the path detected for source file uvmat333 %path_UVMAT=fileparts(path_uvmat); %path to UVMAT334 % xmlparam=fullfile(path_UVMAT,'PARAM.xml');332 path_uvmat=which('editxml');% check the path detected for source file uvmat 333 path_UVMAT=fileparts(path_uvmat); %path to UVMAT 334 % xmlparam=fullfile(path_UVMAT,'PARAM.xml'); 335 335 xmlparam='PARAM.xml'; %will find PARAM.xml whose path is set in priority 336 336 if exist(xmlparam,'file') … … 338 338 sparam=convert(tparam); 339 339 if isfield(sparam,'SchemaPath') 340 schemafile=[fullfile(sparam.SchemaPath,head_name) '.xsd']; 341 end 342 if ~exist(schemafile,'file') 343 schemafile=fullfile(path_UVMAT,schemafile);%look for relative path definition 344 end 345 if exist(schemafile,'file') 346 xs=xmltree(schemafile); 347 else 348 msgbox_uvmat('ERROR',['The xml schema for ' CurrentFile ' is unknown, check the schema path set in the file PARAM.xml']) 349 [FileName, PathName]=uigetfile( ... 350 {'*.xsd', '(*.xsd)'; 351 '*.xsd', '.xsd files '; ... 352 '*.*', 'All Files (*.*)'}, ... 353 'Pick a .xsd schema' ,schemafile); %file browser 354 if ischar(PathName) && ischar(FileName) && exist(fullfile(PathName,FileName),'file') 355 DataIn.Schema=fullfile(PathName,FileName); 356 xs=xmltree(DataIn.Schema);%open the associated schema file 340 schemafile=[fullfile(sparam.SchemaPath,head_name) '.xsd']; 341 if ~exist(schemafile,'file') 342 schemafile=fullfile(path_UVMAT,schemafile);%look for relative path definition 343 end 344 if exist(schemafile,'file') 345 xs=xmltree(schemafile); 357 346 else 358 xs=[]; 347 msgbox_uvmat('ERROR',['The needed xml schema ' sparam.SchemaPath ' is not found, check the file PARAM.xml']) 348 [FileName, PathName]=uigetfile( ... 349 {'*.xsd', '(*.xsd)'; 350 '*.xsd', '.xsd files '; ... 351 '*.*', 'All Files (*.*)'}, ... 352 'Pick a .xsd schema' ,schemafile); %file browser 353 if ischar(PathName) && ischar(FileName) && exist(fullfile(PathName,FileName),'file') 354 DataIn.Schema=fullfile(PathName,FileName); 355 xs=xmltree(DataIn.Schema);%open the associated schema file 356 else 357 xs=[]; 358 end 359 359 end 360 360 end
Note: See TracChangeset
for help on using the changeset viewer.