%XML_ELEM_GETATTRIBUTE
Get the value of an attribute for an XML element
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
status = %XML_ELEM_GETATTRIBUTE(element, attr_name, attr_value)
Return value
status
XML_SUCCESS if a nonblank attribute value is returned.
Arguments
element
The XML element instance. (XML_ELEM_TYPE)
attr_name
The name of the attribute to find a value for. (a)
attr_value
Returned with the value of the specified attribute. (a)
Discussion
%XML_ELEM_GETATTRIBUTE calls %XML_ATTRLIST_FIND to find the XML attribute by name and then calls %XML_ATTR_GETVALUE to get the attribute’s value.
This function is defined as ^VAL.
Examples
xcall xml_elem_getAttribute(root, "name", attrValue)
For a complete example, see Example of parsing XML.