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.5 2007/11/07 20:58:33 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.5 2007/11/07 20:58:33 hewitson Exp $
0008 %
0009 
0010 
0011 disp('-- reading plist');
0012 
0013 pl = plist();
0014 pl = set(pl, 'version', '');
0015 
0016 children = node.getChildNodes;
0017 
0018 for j=1:children.getLength
0019 
0020   ch = children.item(j-1);
0021   nodeName = char(ch.getNodeName);
0022 
0023   switch nodeName
0024     case 'Version'
0025       pl = set(pl, 'version', char(ch.getTextContent));
0026 
0027     case 'Param'
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 if isempty(pl.params) && isempty(pl.version)
0039   pl = [];
0040 end
0041 
0042 
0043 % END

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