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

xml_read_timeformat

PURPOSE ^

XML_READ_TIMEFORMAT read time object from the given node of an XML DOM

SYNOPSIS ^

function tf = xml_read_time(node)

DESCRIPTION ^

 XML_READ_TIMEFORMAT read time object from the given node of an XML DOM
 object.

 FORMAT 23-07-2007

 $Id: xml_read_timeformat.m,v 1.1 2007/08/03 12:15:03 ingo Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function tf = xml_read_time(node)
0002 
0003 % XML_READ_TIMEFORMAT read time object from the given node of an XML DOM
0004 % object.
0005 %
0006 % FORMAT 23-07-2007
0007 %
0008 % $Id: xml_read_timeformat.m,v 1.1 2007/08/03 12:15:03 ingo Exp $
0009 %
0010 
0011 disp('-- reading time');
0012 
0013 tf = timeformat();
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 'format_str'
0021       tf = set(tf, 'format_str', char(ch.getTextContent), 'direct');
0022     case 'format_nr'
0023       tf = set(tf, 'format_nr', str2num(ch.getTextContent), 'direct');
0024     case 'default_matlab_str'
0025       tf = set(tf, 'default_matlab_str', char(ch.getTextContent), 'direct');
0026     case 'default_matlab_nr'
0027       tf = set(tf, 'default_matlab_nr', str2num(ch.getTextContent), 'direct');
0028     case 'default_java_str'
0029       tf = set(tf, 'default_java_str', char(ch.getTextContent), 'direct');
0030     otherwise
0031 %       warning(['!!! unknown hist field: ' nodeName]);
0032   end
0033 end
0034 
0035 
0036

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003