Home > classes > @provenance > 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:57 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:57 hewitson Exp $
0009 %
0010 
0011 el = xml.docNode.createElement(nodename);
0012 
0013 % Now add object
0014 elc = xml.docNode.createElement('provenance');
0015 
0016 % add creator
0017 elcc = xml.docNode.createElement('creator');
0018 elcc.appendChild(xml.docNode.createTextNode(p.creator));
0019 elc.appendChild(elcc);
0020 
0021 % add created
0022 xml = xmladd(p.created, xml, 'created', elc);
0023 
0024 % add ip
0025 elcc = xml.docNode.createElement('ip');
0026 elcc.appendChild(xml.docNode.createTextNode(p.ip));
0027 elc.appendChild(elcc);
0028 
0029 % add hostname
0030 elcc = xml.docNode.createElement('hostname');
0031 elcc.appendChild(xml.docNode.createTextNode(p.hostname));
0032 elc.appendChild(elcc);
0033 
0034 % add OS
0035 elcc = xml.docNode.createElement('os');
0036 elcc.appendChild(xml.docNode.createTextNode(p.os));
0037 elc.appendChild(elcc);
0038 
0039 % add matlab_version
0040 elcc = xml.docNode.createElement('matlab_version');
0041 elcc.appendChild(xml.docNode.createTextNode(p.matlab_version));
0042 elc.appendChild(elcc);
0043 
0044 % add sigproc_version
0045 elcc = xml.docNode.createElement('sigproc_version');
0046 elcc.appendChild(xml.docNode.createTextNode(p.sigproc_version));
0047 elc.appendChild(elcc);
0048 
0049 % add ltpda_version
0050 elcc = xml.docNode.createElement('ltpda_version');
0051 elcc.appendChild(xml.docNode.createTextNode(p.ltpda_version));
0052 elc.appendChild(elcc);
0053 
0054 el.appendChild(elc);
0055 node.appendChild(el);
0056 
0057 
0058 
0059 % END

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