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.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_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.1 2007/06/08 14:15:04 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       h = set(h, 'created', char(ch.getTextContent));
0024     case 'IP'
0025       h = set(h, 'ip', char(ch.getTextContent));
0026     case 'Hostname'
0027       h = set(h, 'hostname', char(ch.getTextContent));
0028     case 'OS'
0029       h = set(h, 'os', char(ch.getTextContent));
0030     case 'matlab_version'
0031       h = set(h, 'matlab_version', char(ch.getTextContent));
0032     case 'sigproc_version'
0033       h = set(h, 'sigproc_version', char(ch.getTextContent));
0034     case 'ltpda_version'
0035       h = set(h, 'ltpda_version', char(ch.getTextContent));
0036     otherwise
0037 %       warning(['!!! unknown hist field: ' nodeName]);
0038   end
0039 end
0040 
0041 
0042

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