Home > classes > @specwin > xmladd.m

xmladd

PURPOSE ^

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

SYNOPSIS ^

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

DESCRIPTION ^

 XMLADD adds specwin object to the given node of the xml input
 DOM.

 M Hewitson 14-02-07

 $Id: xmladd.html,v 1.6 2008/02/12 12:17:50 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function xml = xmladd(p, xml, nodename, node)
0002 
0003 % XMLADD adds specwin object to the given node of the xml input
0004 % DOM.
0005 %
0006 % M Hewitson 14-02-07
0007 %
0008 % $Id: xmladd.html,v 1.6 2008/02/12 12:17:50 hewitson Exp $
0009 %
0010 
0011 el = xml.docNode.createElement(nodename);
0012 
0013 % Now add object
0014 elc = xml.docNode.createElement('specwin');
0015 
0016 % add created
0017 xml = xmladd(p.created, xml, 'created', elc);
0018 % elcc = xml.docNode.createElement('created');
0019 % elcc.appendChild(xml.docNode.createTextNode(p.created));
0020 % elc.appendChild(elcc);
0021 
0022 % add version
0023 elcc = xml.docNode.createElement('version');
0024 elcc.appendChild(xml.docNode.createTextNode(p.version));
0025 elc.appendChild(elcc);
0026 
0027 % add name
0028 elcc = xml.docNode.createElement('name');
0029 elcc.appendChild(xml.docNode.createTextNode(p.name));
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 el.appendChild(elc);
0044 node.appendChild(el);
0045 
0046 
0047 
0048 % END

Generated on Tue 12-Feb-2008 13:12:45 by m2html © 2003