Home > classes > @specwin > private > fromxml.m

fromxml

PURPOSE ^

FROMXML read from part of an XML tree and create a specwin object.

SYNOPSIS ^

function w = fromxml(xml)

DESCRIPTION ^

 FROMXML read from part of an XML tree and create a specwin object.
 
 M Hewitson 28-08-07 
 
 $Id:$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function w = fromxml(xml)
0002 
0003 % FROMXML read from part of an XML tree and create a specwin object.
0004 %
0005 % M Hewitson 28-08-07
0006 %
0007 % $Id:$
0008 %
0009 
0010 
0011 sch = xml.getChildNodes;
0012 for c=1:sch.getLength
0013   x = sch.item(c-1);
0014   switch char(x.getNodeName)
0015     case 'version'
0016       ver = char(x.getTextContent);
0017     case 'name'
0018       name = char(x.getTextContent);
0019     case 'psll'
0020       psll = str2num(char(x.getTextContent));
0021     case 'n'
0022       n = str2num(char(x.getTextContent)); 
0023     otherwise
0024   end
0025 end
0026 
0027 % build window
0028 switch name
0029   case 'Kaiser'
0030     w = specwin(name, n, psll);
0031   otherwise
0032     w = specwin(name, n);
0033 end
0034 
0035 
0036 % END

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