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

xml_read_plist

PURPOSE ^

XML_READ_PLIST read a plist object from the given input node.

SYNOPSIS ^

function pl = xml_read_plist(node)

DESCRIPTION ^

 XML_READ_PLIST read a plist object from the given input node.
 
 M Hewitson 16-02-07
 
 $Id: xml_read_plist.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 pl = xml_read_plist(node)
0002 
0003 % XML_READ_PLIST read a plist object from the given input node.
0004 %
0005 % M Hewitson 16-02-07
0006 %
0007 % $Id: xml_read_plist.html,v 1.1 2007/06/08 14:15:04 hewitson Exp $
0008 %
0009 
0010 
0011 disp('-- reading plist');
0012 
0013 pl = plist();
0014 
0015 children = node.getChildNodes;
0016 
0017 for j=1:children.getLength
0018   
0019   ch = children.item(j-1);  
0020   nodeName = char(ch.getNodeName);  
0021   
0022   switch nodeName
0023     case 'Version'
0024       pl = set(pl, 'version', char(ch.getTextContent));
0025       
0026     case 'Param'
0027       
0028       ps = get(pl, 'params');
0029       p = xml_read_param(ch);
0030       pl = set(pl, 'params', [ps p]);
0031       
0032     otherwise
0033 %       warning(['!!! unknown plist field: ' nodeName]);
0034   end
0035   
0036 end
0037 
0038 
0039 
0040 
0041 % END

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