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

xml_add_specwin

PURPOSE ^

XML_ADD_SPECWIN adds specwin object to the given node of the xml input

SYNOPSIS ^

function xml = xml_add_specwin(xml, p, node)

DESCRIPTION ^

 XML_ADD_SPECWIN adds specwin object to the given node of the xml input
 DOM.
 
 M Hewitson 14-02-07
 
 $Id: xml_add_specwin.m,v 1.5 2007/07/30 12:13:10 ingo Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function xml = xml_add_specwin(xml, p, node)
0002 
0003 % XML_ADD_SPECWIN adds specwin object to the given node of the xml input
0004 % DOM.
0005 %
0006 % M Hewitson 14-02-07
0007 %
0008 % $Id: xml_add_specwin.m,v 1.5 2007/07/30 12:13:10 ingo Exp $
0009 %
0010 
0011 el = xml.docNode.createElement('Value');
0012 
0013 elc = xml.docNode.createElement('Specwin');
0014 
0015 if isa(p, 'specwin')
0016   
0017   % add version
0018   elcc = xml.docNode.createElement('Version');
0019   elcc.appendChild(xml.docNode.createTextNode(p.version));
0020   elc.appendChild(elcc);
0021 
0022   % add name
0023   elcc = xml.docNode.createElement('Name');
0024   elcc.appendChild(xml.docNode.createTextNode(p.name));
0025   elc.appendChild(elcc);
0026   
0027   % add alpha
0028   elcc = xml.docNode.createElement('Alpha');
0029   elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(p.alpha)));
0030   elc.appendChild(elcc);
0031 
0032   % add psll
0033   elcc = xml.docNode.createElement('PSLL');
0034   elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(p.psll)));
0035   elc.appendChild(elcc);
0036     
0037   % add N
0038   elcc = xml.docNode.createElement('N');
0039   elcc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(length(p.win))));
0040   elc.appendChild(elcc);
0041   
0042   
0043 end
0044 
0045 el.appendChild(elc);
0046 node.appendChild(el);
0047 
0048 
0049 
0050 % END

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