Use this function to return the nth attribute value, as indicated by an index number you specify. This function is similar to the XMLNthAttrName function.
XMLNthAttrValue (%XMLTree,#Index)
Parameter |
Description |
%XMLTree |
A list type DAL variable that passes a name list. |
#Index |
A integer type DAL variable that passes an index number. |
The system returns the nth attribute value indicated by the index number.
In this example, the XMLFind function returns a list of attributes and the XMLNthAttrValue function returns the name of the first attribute in the list.
aStr="Attribute not found!";
%xXMLTree=LoadXMLList("test.xml");
%XMLTree=XMLFind(%xXMLTree,"Forms","Form/@*");
aStr=XMLNthAttrValue(%XMLTree, 1);
end
#rt=DestroyList(%xXMLTree);
return(aStr);
© Copyright 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices