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('miir');
0015
0016
0017
0018 elcc = xml.docNode.createElement('version');
0019 elcc.appendChild(xml.docNode.createTextNode(get(p,'version')));
0020 elc.appendChild(elcc);
0021
0022
0023 elcc = xml.docNode.createElement('name');
0024 elcc.appendChild(xml.docNode.createTextNode(get(p,'name')));
0025 elc.appendChild(elcc);
0026
0027
0028 xml = xmladd(get(p, 'created'), xml, 'created', elc);
0029
0030
0031 elcc = xml.docNode.createElement('fs');
0032 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'fs'))));
0033 elc.appendChild(elcc);
0034
0035
0036 elcc = xml.docNode.createElement('ntaps');
0037 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'ntaps'))));
0038 elc.appendChild(elcc);
0039
0040
0041 elcc = xml.docNode.createElement('gain');
0042 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'g'))));
0043 elc.appendChild(elcc);
0044
0045
0046 elcc = xml.docNode.createElement('infile');
0047 elcc.appendChild(xml.docNode.createTextNode(get(p,'infile')));
0048 elc.appendChild(elcc);
0049
0050
0051 pl = get(p,'plist');
0052 if isa(pl, 'plist')
0053 xml = xmladd(pl, xml, 'plist', elc);
0054 end
0055
0056
0057 a = get(p,'a');
0058 elcc = xml.docNode.createElement('a');
0059 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(a)));
0060 elc.appendChild(elcc);
0061
0062
0063 b = get(p,'b');
0064 elcc = xml.docNode.createElement('b');
0065 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(b)));
0066 elc.appendChild(elcc);
0067
0068
0069 ih = get(p, 'histin');
0070 elcc = xml.docNode.createElement('histin');
0071 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(ih)));
0072 elc.appendChild(elcc);
0073
0074
0075 oh = get(p, 'histout');
0076 elcc = xml.docNode.createElement('histout');
0077 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(oh)));
0078 elc.appendChild(elcc);
0079
0080 el.appendChild(elc);
0081 end
0082
0083 node.appendChild(el);
0084
0085
0086
0087