LabWindows/CVI

CVIXMLAddAttribute

CVIXMLStatus CVIXMLAddAttribute (CVIXMLElement element, char *name, char *value);

Purpose

Creates a new attribute with the given name and value. The new attribute is appended to the element's existing attributes.

Parameters

Input
Name Type Description
element CVIXMLElement The element handle must be a valid CVIXMLElement.
name char * Name of the new attribute. If it is NULL, this function returns an error.

Certain attribute names are invalid XML. These include those with white space, non-alphanumeric characters, or numbers.
value char * Value of the new attribute. If it is NULL, this function returns an error.

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:

E_OUTOFMEMORY Out of memory.
E_INVALIDARG Invalid argument to a function.

Additional Information

Library: CVIXML

Include file: toolbox\cvixml.h

LabWindows/CVI compatibility: LabWindows/CVI 7.0 and later

Log in to get a better experience