You are here: Function Reference > Alphabetical Listing > G > GetListElem

GetListElem

Use this XML function to retrieve list elements.

Syntax

GetListElem (%xXMLTree, SrchCriteria)

Parameter

Description

%xXMLTree

Enter a list type DAL variable that passes the XML tree handle.

SrchCriteria

Enter a string type DAL variable that passes the search criteria. The search criteria can be a node name, followed by up to five pairs of attribute names and values.

If successful, the system returns a text string which contains the first element that matches the search criteria.

Example

This example returns the text of the first matched element node Form with the attribute name ID and value Agent.

%xXMLTree=LoadXMLList("test.xml");
  aStr= GetListElem(%xXMLTree, "Form", "ID", "Agent");
  return(aStr);

See also