Home > classes > @ao > xmlparse.m

xmlparse

PURPOSE ^

XMLPARSE creates a ao from a ao xml file.

SYNOPSIS ^

function ps = xmlparse(p, xmlfile)

DESCRIPTION ^

 XMLPARSE creates a ao from a ao xml file.

 M Hewitson 28-08-07
 
 $Id: xmlparse.html,v 1.6 2008/02/12 12:17:53 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ps = xmlparse(p, xmlfile)
0002 
0003 % XMLPARSE creates a ao from a ao xml file.
0004 %
0005 % M Hewitson 28-08-07
0006 %
0007 % $Id: xmlparse.html,v 1.6 2008/02/12 12:17:53 hewitson Exp $
0008 %
0009 
0010 % Read in XML
0011 xdoc = xmlread(xmlfile);
0012 
0013 objs = xdoc.getElementsByTagName('Object');
0014 obj = objs.item(0);
0015 
0016 children = obj.getChildNodes;
0017 ps = [];
0018 % create ao from each child
0019 for j=1:children.getLength
0020   child = children.item(j-1);
0021   if strcmp(char(child.getNodeName), 'ao')
0022     ps = [ps fromxml(child)];
0023   end
0024 end
0025 
0026 end
0027 
0028 % END

Generated on Tue 12-Feb-2008 13:12:45 by m2html © 2003