XML convert a timeformat object to an DOM XML object. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: XML convert a timeformat object to an DOM XML object. CALL: >> x = xml(tf) VERSION: $Id: xml.m,v 1.5 2007/07/09 15:46:45 ingo Exp $ HISTORY: 28-08-2007 M Hewitson Creation SEE also xmlwrite, xmlread %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function x = xml(tf) 0002 % XML convert a timeformat object to an DOM XML object. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: XML convert a timeformat object to an DOM XML object. 0007 % 0008 % CALL: >> x = xml(tf) 0009 % 0010 % VERSION: $Id: xml.m,v 1.5 2007/07/09 15:46:45 ingo Exp $ 0011 % 0012 % HISTORY: 28-08-2007 M Hewitson 0013 % Creation 0014 % 0015 % SEE also xmlwrite, xmlread 0016 % 0017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0018 0019 %% Convert to XML 0020 x.docNode = com.mathworks.xml.XMLUtils.createDocument('timeformat'); 0021 x.docRootNode = x.docNode.getDocumentElement; 0022 x.docNode.appendChild(x.docNode.createComment(sprintf('Created %s', datestr(now)))); 0023 0024 x = xmladd(tf, x, 'Object', x.docRootNode); 0025 0026 0027 % END