LabWindows/CVI

CVIXMLGetElementValueLength

CVIXMLStatus CVIXMLGetElementValueLength (CVIXMLElement element, int *length);

Purpose

Gets the length of the value of an element. This can be used to allocate memory before getting the value of the element. An element can have multiple values, but this function gets the length of the first value that it finds.

Parameters

Input
Name Type Description
element CVIXMLElement The element handle must be a valid CVIXMLElement.
Output
Name Type Description
length int On output, contains the length of the element's value in bytes. The length does not include the terminating NUL-byte.

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 apps\xmlTree\xmlTree.cws for an example of using the CVIXMLGetElementValueLength function.

Log in to get a better experience