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

xml_add_zero

PURPOSE ^

XML_ADD_ZERO add a zero object to the given node of the input XML DOM

SYNOPSIS ^

function xml = xml_add_zero(xml, p, node)

DESCRIPTION ^

 XML_ADD_ZERO add a zero object to the given node of the input XML DOM
 object.

 M Hewitson 14-02-07

 $Id: xml_add_zero.html,v 1.5 2007/11/07 20:58:33 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function xml = xml_add_zero(xml, p, node)
0002 
0003 % XML_ADD_ZERO add a zero object to the given node of the input XML DOM
0004 % object.
0005 %
0006 % M Hewitson 14-02-07
0007 %
0008 % $Id: xml_add_zero.html,v 1.5 2007/11/07 20:58:33 hewitson Exp $
0009 %
0010 
0011 el = xml.docNode.createElement('ZERO');
0012 
0013 
0014 if isa(p, 'zero')
0015 
0016   % Add zero
0017 
0018   % add name
0019   elc = xml.docNode.createElement('Name');
0020   elc.appendChild(xml.docNode.createTextNode(get(p, 'name')));
0021   el.appendChild(elc);
0022 
0023   % add version
0024   elc = xml.docNode.createElement('Version');
0025   elc.appendChild(xml.docNode.createTextNode(get(p, 'version')));
0026   el.appendChild(elc);
0027 
0028   % add f
0029   elc = xml.docNode.createElement('F');
0030   elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'f'))));
0031   el.appendChild(elc);
0032 
0033   % add Q
0034   elc = xml.docNode.createElement('Q');
0035   elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'q'))));
0036   el.appendChild(elc);
0037 
0038   % add ri
0039 %   elc = xml.docNode.createElement('ri');
0040 %   elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'ri'))));
0041 %   el.appendChild(elc);
0042 
0043 end
0044 
0045 el.appendChild(elc);
0046 node.appendChild(el);
0047 
0048

Generated on Tue 06-Nov-2007 12:08:42 by m2html © 2003