0001 function tt = xml_read_time(node)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 disp('-- reading time');
0012
0013 tt = time();
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 'utc_epoch_milli'
0021 tt = set(tt, 'utc_epoch_milli', str2num(ch.getTextContent), 'direct');
0022 case 'timezone'
0023 timezone = char(ch.getTextContent);
0024 timezone = java.util.TimeZone.getTimeZone(timezone);
0025 tt = set(tt, 'timezone', timezone, 'direct');
0026 case 'timeformat'
0027 timeformat = xml_read_timeformat(ch);
0028 tt = set(tt, 'timeformat', timeformat, 'direct');
0029 case 'time_str'
0030 tt = set(tt, 'time_str', char(ch.getTextContent), 'direct');
0031 otherwise
0032
0033 end
0034 end
0035
0036
0037