0001 function xml = xml_add_hist(xml, h, node)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 el = xml.docNode.createElement('hist');
0012
0013
0014
0015
0016 elc = xml.docNode.createElement('Name');
0017 elc.appendChild(xml.docNode.createTextNode(get(h, 'name')));
0018 el.appendChild(elc);
0019
0020
0021 elc = xml.docNode.createElement('Version');
0022 elc.appendChild(xml.docNode.createTextNode(get(h, 'version')));
0023 el.appendChild(elc);
0024
0025
0026 xml = xml_add_time(xml, get(h, 'created'), 'created', el);
0027
0028
0029 elc = xml.docNode.createElement('n');
0030 elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(h, 'n'))));
0031 el.appendChild(elc);
0032
0033
0034 elc = xml.docNode.createElement('pn');
0035 elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(h, 'pn'))));
0036 el.appendChild(elc);
0037
0038
0039 elc = xml.docNode.createElement('consver');
0040 elc.appendChild(xml.docNode.createTextNode(get(h, 'consver')));
0041 el.appendChild(elc);
0042
0043
0044 elc = xml.docNode.createElement('Invars');
0045 invars = get(h, 'invars');
0046 istr = '';
0047 for j=1:length(invars)
0048 istr = [istr ' ' invars{j}];
0049 end
0050 elc.appendChild(xml.docNode.createTextNode(istr));
0051 el.appendChild(elc);
0052
0053
0054 pl = get(h, 'plist');
0055 xml = xml_add_plist(xml, pl, el);
0056
0057
0058 ih = get(h, 'inhists');
0059 if isa(ih, 'history')
0060 for j=1:length(ih)
0061 xml = xml_add_hist(xml, ih(j), el);
0062 end
0063 end
0064
0065
0066
0067
0068 node.appendChild(el);
0069
0070
0071
0072