Home > classes > @timespan > xmladd.m

xmladd

PURPOSE ^

XMLADD add a timespan object to the given node of the input XML DOM

SYNOPSIS ^

function xml = xmladd(tss, xml, nodename, node)

DESCRIPTION ^

 XMLADD add a timespan 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 = xmladd(tss, xml, nodename, node)
0002 
0003 % XMLADD add a timespan 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(nodename);
0012 for j=1:length(tss)
0013   ts = tss(j);
0014   elc = xml.docNode.createElement('timespan');
0015 
0016   % add start time
0017   xml = xmladd(ts.start, xml, 'start', elc);
0018   
0019   % add stop time
0020   xml = xmladd(ts.end, xml, 'end', elc);
0021   
0022   % add timeformat
0023   xml = xmladd(ts.timeformat, xml, 'timeformat', elc);
0024   
0025   el.appendChild(elc);
0026 end
0027 node.appendChild(el);
0028 
0029 
0030 
0031 % END

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