LabWindows/CVI

CVIXMLSetElementValue

CVIXMLStatus CVIXMLSetElementValue (CVIXMLElement element, char *value);

Purpose

Sets the value of an element. An element can have multiple values, but this function replaces the first value that it finds.

Parameters

Input
Name Type Description
element CVIXMLElement The element handle must be a valid CVIXMLElement.
value char * The new value of the element. If the empty string ("") is passed in, then the element's value is removed. If it is NULL, an error is returned.
Note  Some XML elements may have multiple value fields. This function sets the first value of the element. You can set other value fields using the Microsoft XML DOM ActiveX functions.

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

Example

Refer to toolbox\XMLSample.cws for an example of using the CVIXMLSetElementValue function.

Log in to get a better experience