XMLAttrValue

Use this function to return the value of the current attribute pointed to by the XMLFirstAttrib and XMLNextAttrib functions. This function is similar to the XMLAttrName function.

Syntax

XMLAttrValue (%XMLTree)

Parameter

Description

%XMLTree

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

The system returns the value of the current attribute pointed to by the XMLFirstAttrib and XMLNextAttrib functions.

Example

This example returns the second attribute name of the first form in the list.

aStr="Attribute not found!";

%xXMLTree=LoadXMLList("test.xml");

%XMLTree=XMLFind(%xXMLTree,"Forms","Form");

#rc=XMLFirst(%XMLTree);

#rc=XMLFirstAttrib(%XMLTree);

#rc=XMLNextAttrib(%XMLTree);

if #rc > 0

aStr=XMLAttrValue(%XMLTree);

end

#rt=DestroyList(%xXMLTree);

return(aStr);

See also