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.5 2007/11/07 20:58:33 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.5 2007/11/07 20:58:33 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 
0023     case 'created'
0024       created = xml_read_time(ch);
0025       h = set(h, 'created', created);
0026 
0027     case 'n'
0028       h = set(h, 'n', str2num(ch.getTextContent));
0029 
0030     case 'pn'
0031       h = set(h, 'pn', str2num(ch.getTextContent));
0032 
0033     case 'Invars'
0034       h = set(h, 'invars', ltpda_str2cells(char(ch.getTextContent)));
0035 
0036     case 'Plist'
0037       pl = xml_read_plist(ch);
0038       h = set(h, 'plist', pl);
0039     case 'Version'
0040       h = set(h, 'version', char(ch.getTextContent));
0041 
0042     case 'consver'
0043       h = set(h, 'consver', char(ch.getTextContent));
0044 
0045     case 'hist'
0046       ih = get(h, 'inhists');
0047       ihnew = xml_read_hist(ch);
0048       h = set(h, 'inhists', [ih ihnew]);
0049     otherwise
0050       %       warning(['!!! unknown hist field: ' nodeName]);
0051   end
0052 end
0053 
0054 
0055

Generated on Tue 06-Nov-2007 12:08:42 by m2html © 2003