The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:function AddXMLAttributes (Attributes: string): integer;

The method AddXMLAttributes parses the attribute string of an XML tag and adds all identifiers and their corresponding values into the associative array. The identifiers are treated as keys. If an entry with the specified key already exists, the corresponding value is updated. The function returns the number of attributes added to the array.

Example: Suppose the variable attr contains the following string which has been extracted from the list of attributes of an XML tag:
   indexid="persix.cfg" filename="persix" vistitle="Personal Index" visibility="admin"

Then the statement MyAssocArray.AddXMLAttributes (attr); creates the following new entries in the associative array MyAssocArray:

     Key            Value 
     indexid        persix 
     filename       persix.cfg 
     vistitle       Personal Index 
     visibility     admin 

Last Update: 2012-Oct-20