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 elcc = xml.docNode.createElement('Created');
0028 elcc.appendChild(xml.docNode.createTextNode(get(p,'created')));
0029 elc.appendChild(elcc);
0030
0031
0032 elcc = xml.docNode.createElement('Fs');
0033 elcc.appendChild(xml.docNode.createTextNode(num2str(get(p,'fs'))));
0034 elc.appendChild(elcc);
0035
0036
0037 elcc = xml.docNode.createElement('Ntaps');
0038 elcc.appendChild(xml.docNode.createTextNode(num2str(get(p,'ntaps'))));
0039 elc.appendChild(elcc);
0040
0041
0042 elcc = xml.docNode.createElement('Gain');
0043 elcc.appendChild(xml.docNode.createTextNode(num2str(get(p,'g'))));
0044 elc.appendChild(elcc);
0045
0046
0047 elcc = xml.docNode.createElement('Infile');
0048 elcc.appendChild(xml.docNode.createTextNode(get(p,'infile')));
0049 elc.appendChild(elcc);
0050
0051
0052 pl = get(p,'plist');
0053 if isa(pl, 'plist')
0054 xml = xml_add_plist(xml, pl, elc);
0055 end
0056
0057
0058 a = get(p,'a');
0059 for j=1:length(a)
0060 elcc = xml.docNode.createElement('A');
0061 elcc.appendChild(xml.docNode.createTextNode(num2str(a(j))));
0062 elc.appendChild(elcc);
0063 end
0064
0065
0066 b = get(p,'b');
0067 for j=1:length(b)
0068 elcc = xml.docNode.createElement('B');
0069 elcc.appendChild(xml.docNode.createTextNode(num2str(b(j))));
0070 elc.appendChild(elcc);
0071 end
0072
0073 end
0074
0075 el.appendChild(elc);
0076 node.appendChild(el);
0077
0078
0079
0080