0001 function xml = xml_add_miir(xml, p, node)
0002
0003
0004
0005
0006
0007
0008
0009
0010 el = xml.docNode.createElement('Value');
0011
0012 elc = xml.docNode.createElement('MIIR');
0013
0014 if isa(p, 'miir')
0015
0016
0017 elcc = xml.docNode.createElement('Version');
0018 elcc.appendChild(xml.docNode.createTextNode(get(p,'version')));
0019 elc.appendChild(elcc);
0020
0021
0022 elcc = xml.docNode.createElement('Name');
0023 elcc.appendChild(xml.docNode.createTextNode(get(p,'name')));
0024 elc.appendChild(elcc);
0025
0026
0027 xml = xml_add_time(xml, get(p, 'created'), 'created', elc);
0028
0029
0030 elcc = xml.docNode.createElement('Fs');
0031 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'fs'))));
0032 elc.appendChild(elcc);
0033
0034
0035 elcc = xml.docNode.createElement('Ntaps');
0036 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'ntaps'))));
0037 elc.appendChild(elcc);
0038
0039
0040 elcc = xml.docNode.createElement('Gain');
0041 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'g'))));
0042 elc.appendChild(elcc);
0043
0044
0045 elcc = xml.docNode.createElement('Infile');
0046 elcc.appendChild(xml.docNode.createTextNode(get(p,'infile')));
0047 elc.appendChild(elcc);
0048
0049
0050 pl = get(p,'plist');
0051 if isa(pl, 'plist')
0052 xml = xml_add_plist(xml, pl, elc);
0053 end
0054
0055
0056 a = get(p,'a');
0057 for j=1:length(a)
0058 elcc = xml.docNode.createElement('A');
0059 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(a(j))));
0060 elc.appendChild(elcc);
0061 end
0062
0063
0064 b = get(p,'b');
0065 for j=1:length(b)
0066 elcc = xml.docNode.createElement('B');
0067 elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(b(j))));
0068 elc.appendChild(elcc);
0069 end
0070
0071
0072 ih = get(p, 'histin');
0073 if isa(ih, 'history')
0074 for j=1:length(ih)
0075 xml = xml_add_hist(xml, ih(j), el);
0076 end
0077 end
0078
0079
0080 oh = get(p, 'histout');
0081 if isa(oh, 'history')
0082 for j=1:length(oh)
0083 xml = xml_add_hist(xml, oh(j), el);
0084 end
0085 end
0086
0087 end
0088
0089 el.appendChild(elc);
0090 node.appendChild(el);
0091
0092
0093
0094