0001 function f = xml_read_miir(node)
0002
0003
0004
0005
0006
0007
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
0063 end
0064
0065 end
0066
0067 f = set(f, 'a', a);
0068 f = set(f, 'b', b);
0069
0070