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.html,v 1.1 2007/06/08 14:15:04 hewitson 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.html,v 1.1 2007/06/08 14:15:04 hewitson 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(num2str(get(p,'f'))));
0037   el.appendChild(elc);
0038 
0039   % add Q
0040   elc = xml.docNode.createElement('Q');
0041   elc.appendChild(xml.docNode.createTextNode(num2str(get(p,'q'))));
0042   el.appendChild(elc);
0043   
0044   
0045 end
0046 
0047 el.appendChild(elc);
0048 node.appendChild(el);
0049 
0050

Generated on Fri 08-Jun-2007 16:09:11 by m2html © 2003