XML convert a specwin object to an DOM XML object. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: XML convert a specwin object to an DOM XML object. CALL: >> x = xml(s) VERSION: $Id: xml.html,v 1.6 2008/02/12 12:17:50 hewitson Exp $ HISTORY: 28-08-2007 M Hewitson Creation SEE also xmlwrite, xmlread %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function x = xml(s) 0002 % XML convert a specwin object to an DOM XML object. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: XML convert a specwin object to an DOM XML object. 0007 % 0008 % CALL: >> x = xml(s) 0009 % 0010 % VERSION: $Id: xml.html,v 1.6 2008/02/12 12:17:50 hewitson 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('specwin'); 0021 x.docRootNode = x.docNode.getDocumentElement; 0022 % x.docNode.appendChild(x.docNode.createComment(sprintf('Created %s', datestr(now)))); 0023 0024 x = xmladd(s, x, 'Object', x.docRootNode); 0025 0026 0027 % END