Changeset 998 for trunk/src/editxml.m
- Timestamp:
- Feb 17, 2017, 12:09:25 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/editxml.m
r977 r998 111 111 DataIn=get(heditxml,'UserData'); 112 112 if ~isempty(xs) 113 114 115 116 117 113 xs_node=list.xs_uid(ind);%xs_node of the subelement #ind 114 [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_node); 115 [element,subelem]=get_xml(t,path,xs_element,NewRootUid,xs_subelem); 116 update_list(handles,path,xs_element,element,NewRootUid,xs_subelem,subelem); 117 if xs_element.subtest 118 118 DataIn.CurrentUid=[DataIn.CurrentUid NewRootUid];%record new current uid 119 119 DataIn.xs_CurrentUid=[DataIn.xs_CurrentUid xs_node];%record the new curent schema uid 120 120 end 121 121 122 122 % %update the import file display … … 174 174 else 175 175 [xs_nodeup,path,xs_element,xs_subelem]=scan_schema(xs,xs_nodeup); 176 177 176 [element,subelem]=get_xml(t,path,xs_element,nodeup,xs_subelem); 177 update_list(handles,path,xs_element,element,nodeup,xs_subelem,subelem); 178 178 %update the import file display 179 179 if isfield(DataIn,'h_ref')&ishandle(DataIn.h_ref) … … 369 369 else 370 370 DataIn.xs_CurrentUid=find(xs,'/xs:schema/xs:element');%uid of the root element in the schema 371 372 373 371 [nodeup,path,xs_element,xs_subelem]=scan_schema(xs,DataIn.xs_CurrentUid);%scan the schema at the root level 372 [element,subelem]=get_xml(t,path,xs_element,1,xs_subelem);% read the corresponding xml data 373 update_list(handles,path,xs_element,element,1,xs_subelem,subelem);%update the display of information on the interface 374 374 end 375 375 set(heditxml,'UserData',DataIn);%store the new input xml file name … … 655 655 up=1; 656 656 if node>0 657 658 657 nodeup=node; 658 while up==1; 659 659 nodeup=get(t,nodeup,'parent');%move up to the parent in the tree 660 660 if isempty(nodeup) … … 671 671 end 672 672 end 673 674 673 end 674 element.attrup=attrup; 675 675 end 676 676 %find the subelement properties in the xml file … … 1043 1043 list_element=[]; 1044 1044 % Data.CurrentUid=[Data.CurrentUid root_uid]%record new current uid 1045 1045 for iline=1:length(list_uid) 1046 1046 element=get(t,list_uid(iline)); 1047 1047 if isfield(element,'type')&isequal(element.type,'element') … … 1071 1071 end 1072 1072 end 1073 1073 end 1074 1074 set(handles.list_element,'Value',1)%select the first line of list_element by default 1075 1075 set(handles.list_element,'String',cell2tab(list_element,' ') ) 1076 1076 list.uid=list_uid; 1077 1077 set(handles.list_element,'UserData',list) 1078 1078 end 1079 1079 %--------------------------------------------------------- … … 1415 1415 % up=1 1416 1416 % if node>0 1417 % 1418 % 1417 % nodeup=node; 1418 % while up==1; 1419 1419 % nodeup=get(t,nodeup,'parent');%move up to the parent in the tree 1420 1420 % if isempty(nodeup) … … 1431 1431 % end 1432 1432 % end 1433 % 1434 % 1433 % end 1434 % element.attrup=attrup; 1435 1435 % end 1436 1436 % %find the subelement properties in the xml file
Note: See TracChangeset
for help on using the changeset viewer.