CVIXMLGetAttributeByIndex
- Updated2023-02-21
- 2 minute(s) read
CVIXMLStatus CVIXMLGetAttributeByIndex (CVIXMLElement element, int index, CVIXMLAttribute *attribute);
Purpose
Gets an element's attribute at the specified position. If the attribute does not exist at the index, the function returns an error.
Parameters
| Input | ||
| Name | Type | Description |
| element | CVIXMLElement | The element handle must be a valid CVIXMLElement. |
| index | int | The zero-based index where the attribute is located under the parent element. Pass –1 to get the last attribute. |
| Output | ||
| Name | Type | Description |
| attribute | CVIXMLAttribute | On output, contains the handle to the attribute object obtained in this function. If the attribute does not exist at the index, this function returns an error. This handle must be discarded using the CVIXMLDiscardAttribute function. |
Return Value
| Name | Type | Description | ||||
| status | CVIXMLStatus | Indicates whether the function was successful. A zero indicates success. You can call CVIXMLGetErrorString to obtain textual descriptions of error codes. Among the more commonly encountered errors are:
|
Additional Information
Library: CVIXML
Include file: toolbox\cvixml.h
LabWindows/CVI compatibility: LabWindows/CVI 7.0 and later
