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

xml_add_time

PURPOSE ^

XML_ADD_TIME add a time object to the given node of the input XML DOM

SYNOPSIS ^

function xml = xml_add_time(xml, tt, node_name, node)

DESCRIPTION ^

 XML_ADD_TIME add a time object to the given node of the input XML DOM
 object.

 Diepholz 23-07-2007

 $Id: xml_add_time.m,v 1.3 2007/08/14 09:17:03 ingo Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function xml = xml_add_time(xml, tt, node_name, node)
0002 
0003 % XML_ADD_TIME add a time object to the given node of the input XML DOM
0004 % object.
0005 %
0006 % Diepholz 23-07-2007
0007 %
0008 % $Id: xml_add_time.m,v 1.3 2007/08/14 09:17:03 ingo Exp $
0009 %
0010 
0011 el = xml.docNode.createElement(node_name);
0012 
0013 % add utc_epoch_milli
0014 elc = xml.docNode.createElement('utc_epoch_milli');
0015 elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(tt, 'utc_epoch_milli'))));
0016 el.appendChild(elc);
0017 
0018 % add timezone
0019 elc = xml.docNode.createElement('timezone');
0020 timezone = get(tt, 'timezone');
0021 elc.appendChild(xml.docNode.createTextNode(char(timezone.getID)));
0022 el.appendChild(elc);
0023 
0024 %add timeformat
0025 xml = xml_add_timeformat(xml, get(tt, 'timeformat'), el);
0026 
0027 % add time_str
0028 elc = xml.docNode.createElement('time_str');
0029 elc.appendChild(xml.docNode.createTextNode(get(tt, 'time_str')));
0030 el.appendChild(elc);
0031 
0032 node.appendChild(el);
0033 
0034 
0035 
0036 % END

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