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

xml_add_pole

PURPOSE ^

XML_ADD_POLE add a pole object to the given node of the input XML DOM

SYNOPSIS ^

function xml = xml_add_pole(xml, p, node)

DESCRIPTION ^

 XML_ADD_POLE add a pole object to the given node of the input XML DOM
 object.

 M Hewitson 14-02-07

 $Id: xml_add_pole.m,v 1.3 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_pole(xml, p, node)
0002 
0003 % XML_ADD_POLE add a pole object to the given node of the input XML DOM
0004 % object.
0005 %
0006 % M Hewitson 14-02-07
0007 %
0008 % $Id: xml_add_pole.m,v 1.3 2007/07/30 12:13:10 ingo Exp $
0009 %
0010 
0011 el = xml.docNode.createElement('POLE');
0012 
0013 %       p.name    = 'real pole';
0014 %       p.f       = varargin{1};
0015 %       p.q       = -1;
0016 %       p.ri      = p.f;
0017 %       p.version = VERSION;
0018 
0019 
0020 if isa(p, 'pole')
0021 
0022   % Add pole
0023 
0024   % add name
0025   elc = xml.docNode.createElement('Name');
0026   elc.appendChild(xml.docNode.createTextNode(get(p, 'name')));
0027   el.appendChild(elc);
0028 
0029   % add version
0030   elc = xml.docNode.createElement('Version');
0031   elc.appendChild(xml.docNode.createTextNode(get(p, 'version')));
0032   el.appendChild(elc);
0033 
0034   % add f
0035   elc = xml.docNode.createElement('F');
0036   elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'f'))));
0037   el.appendChild(elc);
0038 
0039   % add Q
0040   elc = xml.docNode.createElement('Q');
0041   elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'q'))));
0042   el.appendChild(elc);
0043 
0044 %   % add ri
0045 %   elc = xml.docNode.createElement('ri');
0046 %   elc.appendChild(xml.docNode.createTextNode(ltpda_mat2str(get(p,'ri'))));
0047 %   el.appendChild(elc);
0048 
0049 end
0050 
0051 el.appendChild(elc);
0052 node.appendChild(el);
0053 
0054

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