Changeset 508 for trunk/src/editxml.m
- Timestamp:
- Jul 31, 2012, 6:55:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/editxml.m
r248 r508 55 55 % set(handles.replicate,'String',['copy';'<---']) 56 56 if nargin 57 CurrentFile=varargin{1} 57 CurrentFile=varargin{1}; 58 58 else 59 59 CurrentFile=[]; … … 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 UVMAT332 path_uvmat=fileparts(which('editxml'));% check the path detected for source file uvmat 333 % path_UVMAT=fileparts(path_uvmat); %path to UVMAT 334 334 % xmlparam=fullfile(path_UVMAT,'PARAM.xml'); 335 xmlparam='PARAM.xml'; %will find PARAM.xml whose path is set in priority336 if exist(xmlparam,'file')337 tparam=xmltree(xmlparam);338 sparam=convert(tparam);339 if isfield(sparam,'SchemaPath')340 schemafile=[fullfile(sparam.SchemaPath,head_name) '.xsd'];341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 end361 end335 % xmlparam='PARAM.xml'; %will find PARAM.xml whose path is set in priority 336 % if exist(xmlparam,'file') 337 % tparam=xmltree(xmlparam); 338 % sparam=convert(tparam); 339 % if isfield(sparam,'SchemaPath') 340 schemafile=[fullfile(path_uvmat,'xml_shemas',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); 346 else 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 end 360 % end 361 % end 362 362 end 363 363 DataIn.CurrentUid=1;
Note: See TracChangeset
for help on using the changeset viewer.