Home > classes > @history > xmlparse.m

xmlparse

PURPOSE ^

XMLPARSE creates a history from a history xml file.

SYNOPSIS ^

function ps = xmlparse(p, xmlfile)

DESCRIPTION ^

 XMLPARSE creates a history from a history xml file.

 M Hewitson 28-08-07

 
 $Id: xmlparse.html,v 1.6 2008/02/12 12:17:57 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Tue 12-Feb-2008 13:12:45 by m2html © 2003