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

xml_read_provenance

PURPOSE ^

XML_READ_PROVENANCE read provenance object from the given node of an XML DOM

SYNOPSIS ^

function h = xml_read_provenance(node)

DESCRIPTION ^

 XML_READ_PROVENANCE read provenance object from the given node of an XML DOM
 object.

 M Hewitson 14-02-07

 $Id: xml_read_provenance.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_provenance(node)
0002 
0003 % XML_READ_PROVENANCE read provenance object from the given node of an XML DOM
0004 % object.
0005 %
0006 % M Hewitson 14-02-07
0007 %
0008 % $Id: xml_read_provenance.html,v 1.5 2007/11/07 20:58:33 hewitson Exp $
0009 %
0010 
0011 disp('-- reading provenance');
0012 
0013 h = provenance();
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 'Creator'
0021       h = set(h, 'creator', char(ch.getTextContent));
0022     case 'created'
0023       created = xml_read_time(ch);
0024       h = set(h, 'created', created);
0025     case 'IP'
0026       h = set(h, 'ip', char(ch.getTextContent));
0027     case 'Hostname'
0028       h = set(h, 'hostname', char(ch.getTextContent));
0029     case 'OS'
0030       h = set(h, 'os', char(ch.getTextContent));
0031     case 'matlab_version'
0032       h = set(h, 'matlab_version', char(ch.getTextContent));
0033     case 'sigproc_version'
0034       h = set(h, 'sigproc_version', char(ch.getTextContent));
0035     case 'ltpda_version'
0036       h = set(h, 'ltpda_version', char(ch.getTextContent));
0037     otherwise
0038 %       warning(['!!! unknown hist field: ' nodeName]);
0039   end
0040 end
0041 
0042 
0043

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