Home > classes > @ao > private > xml_read_hist.m

xml_read_hist

PURPOSE ^

XML_READ_HIST read history object from the given node of an XML DOM

SYNOPSIS ^

function h = xml_read_hist(node)

DESCRIPTION ^

 XML_READ_HIST read history object from the given node of an XML DOM
 object.
 
 M Hewitson 14-02-07
 
 $Id: xml_read_hist.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 h = xml_read_hist(node)
0002 
0003 % XML_READ_HIST read history object from the given node of an XML DOM
0004 % object.
0005 %
0006 % M Hewitson 14-02-07
0007 %
0008 % $Id: xml_read_hist.html,v 1.1 2007/06/08 14:15:04 hewitson Exp $
0009 %
0010 
0011 disp('-- reading history');
0012 
0013 h = history();
0014 children = node.getChildNodes;
0015 
0016 for j=1:children.getLength
0017   ch = children.item(j-1);  
0018   nodeName = char(ch.getNodeName);  
0019   switch nodeName
0020     case 'Name'
0021       h = set(h, 'name', char(ch.getTextContent));
0022     case 'Created'
0023       h = set(h, 'created', char(ch.getTextContent));
0024     case 'Invars'
0025       h = set(h, 'invars', ltpda_str2cells(char(ch.getTextContent)));
0026     case 'Plist'
0027       pl = xml_read_plist(ch);
0028       h = set(h, 'plist', pl);
0029     case 'Version'
0030       h = set(h, 'version', char(ch.getTextContent));   
0031     case 'hist'
0032       ih = get(h, 'inhists');
0033       ihnew = xml_read_hist(ch);
0034       h = set(h, 'inhists', [ih ihnew]);
0035     otherwise
0036 %       warning(['!!! unknown hist field: ' nodeName]);
0037   end
0038 end
0039 
0040 
0041

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