Changeset 54 for trunk/src/editxml.m
- Timestamp:
- Mar 16, 2010, 7:41:52 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/editxml.m
r42 r54 332 332 path_uvmat=which('editxml');% check the path detected for source file uvmat 333 333 path_UVMAT=fileparts(path_uvmat); %path to UVMAT 334 if isunix 335 xmlparam=fullfile(path_UVMAT,'PARAM_LINUX.xml') 336 if exist(xmlparam,'file') 337 tparam=xmltree(xmlparam); 338 sparam=convert(tparam); 339 if isfield(sparam,'SchemaPath') 340 schemapath=[fullfile(sparam.SchemaPath,head_name) '.xsd'] 341 end 342 end 334 % if isunix 335 xmlparam=fullfile(path_UVMAT,'PARAM.xml'); 336 if exist(xmlparam,'file') 337 tparam=xmltree(xmlparam); 338 sparam=convert(tparam); 339 if isfield(sparam,'SchemaPath') 340 schemapath=[fullfile(sparam.SchemaPath,head_name) '.xsd'] 341 end 342 if exist(fullfile(path_UVMAT,schemapath) 343 schemapath=fullfile(path_UVMAT,schemapath);%look for relative path definition 344 end 345 schemapath=fullfile(path_UVMAT,schemapath); 343 346 % schemapath=['/coriolis/papillon/data/civbin/XML_SCHEMAS/' head_name '.xsd']%current dir for schema 344 else345 xmlparam=fullfile(path_UVMAT,'PARAM_WIN.xml')346 if exist(xmlparam,'file')347 tparam=xmltree(xmlparam);348 sparam=convert(tparam)349 if isfield(sparam,'SchemaPath')350 schemapath=[fullfile(sparam.SchemaPath,head_name) '.xsd']351 end352 end347 % else 348 % xmlparam=fullfile(path_UVMAT,'PARAM_WIN.xml') 349 % if exist(xmlparam,'file') 350 % tparam=xmltree(xmlparam); 351 % sparam=convert(tparam) 352 % if isfield(sparam,'SchemaPath') 353 % schemapath=[fullfile(sparam.SchemaPath,head_name) '.xsd'] 354 % end 355 % end 353 356 % schemapath=['\\Papillon\data\civbin\XML_SCHEMAS\' head_name '.xsd']%current dir for schemas 354 end357 % end 355 358 if exist(schemapath,'file') 356 359 xs=xmltree(schemapath); 357 360 else 358 msgbox_uvmat('ERROR',['The xml schema for ' CurrentFile ' is unknown, check the schema path set in the xml file PARAM'])361 msgbox_uvmat('ERROR',['The xml schema for ' CurrentFile ' is unknown, check the schema path set in the file PARAM.xml']) 359 362 [FileName, PathName]=uigetfile( ... 360 363 {'*.xsd', '(*.xsd)';
Note: See TracChangeset
for help on using the changeset viewer.