0001 function h = xml_read_hist(node)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 disp('-- reading history');
0012
0013 h = history();
0014 children = node.getChildNodes;
0015
0016 for j=1:children.getLength
0017 ch = children.item(j-1);
0018 nodeName = char(ch.getNodeName);
0019 switch nodeName
0020 case 'Name'
0021 h = set(h, 'name', char(ch.getTextContent));
0022
0023 case 'created'
0024 created = xml_read_time(ch);
0025 h = set(h, 'created', created);
0026
0027 case 'n'
0028 h = set(h, 'n', str2num(ch.getTextContent));
0029
0030 case 'pn'
0031 h = set(h, 'pn', str2num(ch.getTextContent));
0032
0033 case 'Invars'
0034 h = set(h, 'invars', ltpda_str2cells(char(ch.getTextContent)));
0035
0036 case 'Plist'
0037 pl = xml_read_plist(ch);
0038 h = set(h, 'plist', pl);
0039 case 'Version'
0040 h = set(h, 'version', char(ch.getTextContent));
0041
0042 case 'consver'
0043 h = set(h, 'consver', char(ch.getTextContent));
0044
0045 case 'hist'
0046 ih = get(h, 'inhists');
0047 ihnew = xml_read_hist(ch);
0048 h = set(h, 'inhists', [ih ihnew]);
0049 otherwise
0050
0051 end
0052 end
0053
0054
0055