0001 function xml = xmladd(ps, xml, nodename, node)
0002
0003
0004
0005
0006
0007
0008
0009
0010 el = xml.docNode.createElement(nodename);
0011
0012 for j=1:length(ps)
0013 p = ps(j);
0014 elc = xml.docNode.createElement('mfir');
0015
0016
0017
0018 elcc = xml.docNode.createElement('name');
0019 elcc.appendChild(xml.docNode.createTextNode(get(p,'name')));
0020 elc.appendChild(elcc);
0021
0022
0023 elcc = xml.docNode.createElement('fs');
0024 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'fs'))));
0025 elc.appendChild(elcc);
0026
0027
0028 elcc = xml.docNode.createElement('ntaps');
0029 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'ntaps'))));
0030 elc.appendChild(elcc);
0031
0032
0033 a = get(p,'a');
0034 elcc = xml.docNode.createElement('a');
0035 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(a)));
0036 elc.appendChild(elcc);
0037
0038
0039 a = get(p,'gd');
0040 elcc = xml.docNode.createElement('gd');
0041 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(a)));
0042 elc.appendChild(elcc);
0043
0044
0045 elcc = xml.docNode.createElement('gain');
0046 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'gain'))));
0047 elc.appendChild(elcc);
0048
0049
0050 oh = get(p, 'histout');
0051 elcc = xml.docNode.createElement('histout');
0052 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(oh)));
0053 elc.appendChild(elcc);
0054
0055
0056 elcc = xml.docNode.createElement('infile');
0057 elcc.appendChild(xml.docNode.createTextNode(get(p,'infile')));
0058 elc.appendChild(elcc);
0059
0060
0061 pl = get(p,'plist');
0062 if isa(pl, 'plist')
0063 xml = xmladd(pl, xml, 'plist', elc);
0064 end
0065
0066
0067 xml = xmladd(get(p, 'created'), xml, 'created', elc);
0068
0069
0070 elcc = xml.docNode.createElement('version');
0071 elcc.appendChild(xml.docNode.createTextNode(get(p,'version')));
0072 elc.appendChild(elcc);
0073
0074 el.appendChild(elc);
0075 end
0076 node.appendChild(el);
0077
0078
0079
0080