0001 function xml = xmladd(pls, xml, nodename, node)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 el = xml.docNode.createElement(nodename);
0013
0014 for j=1:length(pls)
0015
0016 pl = pls(j);
0017
0018 elc = xml.docNode.createElement('plist');
0019
0020
0021 elcc = xml.docNode.createElement('name');
0022 elcc.appendChild(xml.docNode.createTextNode(pl.name));
0023 elc.appendChild(elcc);
0024
0025
0026 elcc = xml.docNode.createElement('version');
0027 elcc.appendChild(xml.docNode.createTextNode(get(pl, 'version')));
0028 elc.appendChild(elcc);
0029
0030
0031 xml = xmladd(pl.created, xml, 'created', elc);
0032
0033 ps = get(pl, 'params');
0034 if ~isempty(ps)
0035 xml = xmladd(ps, xml, 'params', elc);
0036 end
0037 el.appendChild(elc);
0038 end
0039 node.appendChild(el);
0040
0041
0042
0043
0044
0045
0046
0047
0048