Home > classes > @ao > private > xml_read_miir.m

xml_read_miir

PURPOSE ^

XML_READ_MIIR read an MIIR object from the given input node.

SYNOPSIS ^

function f = xml_read_miir(node)

DESCRIPTION ^

 XML_READ_MIIR read an MIIR object from the given input node.

 M Hewitson 16-02-07

 $Id: xml_read_miir.m,v 1.5 2007/07/30 12:13:10 ingo Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function f = xml_read_miir(node)
0002 
0003 % XML_READ_MIIR read an MIIR object from the given input node.
0004 %
0005 % M Hewitson 16-02-07
0006 %
0007 % $Id: xml_read_miir.m,v 1.5 2007/07/30 12:13:10 ingo Exp $
0008 %
0009 
0010 disp('-- reading miir');
0011 f = miir();
0012 a = [];
0013 b = [];
0014 
0015 children = node.getChildNodes;
0016 for j=1:children.getLength
0017   ch = children.item(j-1);
0018   nodeName = char(ch.getNodeName);
0019   switch nodeName
0020     case 'Name'
0021       f = set(f, 'name', char(ch.getTextContent));
0022 
0023     case 'Version'
0024       f = set(f, 'version', char(ch.getTextContent));
0025 
0026     case 'created'
0027       created = xml_read_time(ch);
0028       f = set(f, 'created', created);
0029       
0030     case 'Plist'
0031       pl = xml_read_plist(ch);
0032       f = set(f, 'plist', pl);
0033 
0034     case 'Fs'
0035       f = set(f, 'fs', str2num(char(ch.getTextContent)));
0036 
0037     case 'Ntaps'
0038       f = set(f, 'ntaps', str2num(char(ch.getTextContent)));
0039 
0040     case 'Gain'
0041       f = set(f, 'g', str2num(char(ch.getTextContent)));
0042 
0043     case 'Infile'
0044       f = set(f, 'infile', char(ch.getTextContent));
0045 
0046     case 'A'
0047       a = [a str2num(char(ch.getTextContent))];
0048 
0049     case 'B'
0050       b = [b str2num(char(ch.getTextContent))];
0051 
0052     case 'hist'
0053       h = xml_read_hist(ch);
0054       histin = get(f, 'histin');
0055       if isempty(histin)
0056         f = set(f, 'histin', h);
0057       else
0058         f = set(f, 'histout', h);
0059       end
0060 
0061     otherwise
0062       %       warning('!!! unknown miir field');
0063   end
0064 
0065 end
0066 
0067 f = set(f, 'a', a);
0068 f = set(f, 'b', b);
0069 
0070 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003