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 elc = xml.docNode.createElement('Created');
0027 elc.appendChild(xml.docNode.createTextNode(get(h, 'created')));
0028 el.appendChild(elc);
0029
0030
0031 elc = xml.docNode.createElement('Invars');
0032 invars = get(h, 'invars');
0033 istr = '';
0034 for j=1:length(invars)
0035 istr = [istr ' ' invars{j}];
0036 end
0037 elc.appendChild(xml.docNode.createTextNode(istr));
0038 el.appendChild(elc);
0039
0040
0041 pl = get(h, 'plist');
0042 xml = xml_add_plist(xml, pl, el);
0043
0044 ih = get(h, 'inhists');
0045 if isa(ih, 'history')
0046 for j=1:length(ih)
0047 xml = xml_add_hist(xml, ih(j), el);
0048 end
0049 end
0050
0051
0052
0053
0054 node.appendChild(el);
0055
0056
0057
0058