0001 function xml = xml_add_param(xml, p, node)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 el = xml.docNode.createElement('Param');
0012
0013 if isa(p, 'param')
0014
0015 elc = xml.docNode.createElement('Version');
0016 elc.appendChild(xml.docNode.createTextNode(p.version));
0017 el.appendChild(elc);
0018
0019
0020 elc = xml.docNode.createElement('Key');
0021 elc.appendChild(xml.docNode.createTextNode(p.key));
0022 el.appendChild(elc);
0023
0024
0025 elc = xml.docNode.createElement('Value');
0026 if ischar(p.val)
0027 elc.appendChild(xml.docNode.createTextNode(p.val));
0028 el.appendChild(elc);
0029 elseif isnumeric(p.val)
0030 elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(p.val)));
0031 el.appendChild(elc);
0032 elseif isa(p.val, 'specwin')
0033 xml = xml_add_specwin(xml, p.val, el);
0034 elseif isa(p.val, 'miir')
0035 xml = xml_add_miir(xml, p.val, el);
0036 elseif isa(p.val, 'pzmodel')
0037 xml = xml_add_pzmodel(xml, p.val, el);
0038 else
0039 p.val
0040 whos('p')
0041 error('### unknown parameter type.');
0042 end
0043
0044 end
0045
0046 node.appendChild(el);
0047
0048
0049
0050