Home > atmlab > arts > xml > xmlGetAttrValue.m

xmlGetAttrValue

PURPOSE ^

Internal function to get the value of an attribute.

SYNOPSIS ^

function value = xmlGetAttrValue(attrlist, name)

DESCRIPTION ^

 Internal function to get the value of an attribute.

    Takes an attribute name and returns its value if found in the
    attribute list.

 FORMAT   value = xmlGetAttrValue(attrlist, name)

 OUT   value      Attribute value
 IN    attrlist   List of attributes
 IN    name       Retrieve value of attribute with name

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

xmlGetAttrValue.m

SOURCE CODE ^

0001 % Internal function to get the value of an attribute.
0002 %
0003 %    Takes an attribute name and returns its value if found in the
0004 %    attribute list.
0005 %
0006 % FORMAT   value = xmlGetAttrValue(attrlist, name)
0007 %
0008 % OUT   value      Attribute value
0009 % IN    attrlist   List of attributes
0010 % IN    name       Retrieve value of attribute with name
0011  
0012 % 2002-09-25   Created by Oliver Lemke.
0013 
0014 function value = xmlGetAttrValue(attrlist, name)
0015 
0016 j = size(attrlist);
0017 
0018 value = [];
0019 
0020 for i = 1:j(1)
0021   if strcmp (attrlist {i,1}, name)
0022     value = attrlist {i,2};
0023     break;
0024   end
0025 end
0026 
0027 clear i j name;
0028

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005