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.html,v 1.1 2007/06/08 14:15:04 hewitson 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.html,v 1.1 2007/06/08 14:15:04 hewitson 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     case 'Version'
0023       f = set(f, 'version', char(ch.getTextContent));
0024     case 'Created'
0025       f = set(f, 'created', char(ch.getTextContent));
0026     case 'Plist'
0027       pl = xml_read_plist(ch);
0028       f = set(f, 'plist', pl);
0029     case 'Fs'      
0030       f = set(f, 'fs', str2num(char(ch.getTextContent)));
0031     case 'Ntaps'      
0032       f = set(f, 'ntaps', str2num(char(ch.getTextContent)));
0033     case 'Gain'      
0034       f = set(f, 'g', str2num(char(ch.getTextContent)));
0035     case 'Infile'      
0036       f = set(f, 'infile', char(ch.getTextContent));
0037     case 'A'
0038       a = [a str2num(char(ch.getTextContent))];
0039     case 'B'
0040       b = [b str2num(char(ch.getTextContent))];
0041       
0042     otherwise
0043 %       warning('!!! unknown miir field');
0044   end
0045   
0046 end
0047 
0048 f = set(f, 'a', a);
0049 f = set(f, 'b', b);
0050 
0051 
0052 
0053 % END

Generated on Fri 08-Jun-2007 16:09:11 by m2html © 2003