XMLPARSE creates a specwin from a specwin xml file. M Hewitson 28-08-07 $Id: xmlparse.html,v 1.6 2008/02/12 12:17:50 hewitson Exp $
0001 function ps = xmlparse(p, xmlfile) 0002 0003 % XMLPARSE creates a specwin from a specwin xml file. 0004 % 0005 % M Hewitson 28-08-07 0006 % 0007 % $Id: xmlparse.html,v 1.6 2008/02/12 12:17:50 hewitson Exp $ 0008 % 0009 0010 % Read in XML 0011 xdoc = xmlread(xmlfile); 0012 0013 objs = xdoc.getElementsByTagName('Object'); 0014 obj = objs.item(0); 0015 0016 children = obj.getChildNodes; 0017 ps = []; 0018 % create param from each child 0019 for j=1:children.getLength 0020 child = children.item(j-1); 0021 if strcmp(char(child.getNodeName), 'specwin') 0022 ps = [ps fromxml(child)]; 0023 end 0024 end 0025 0026 end 0027 0028 % END