LabWindows/CVI

CVIXMLGetChildElementByTag

CVIXMLStatus CVIXMLGetChildElementByTag (CVIXMLElement element, char *tag, CVIXMLElement *childElement);

Purpose

Gets an element's child by its tag. This function outputs the first element it finds with the tag.

Parameters

Input
Name Type Description
element CVIXMLElement The element handle must be a valid CVIXMLElement.
tag char * Tag to search for the element by. If it is NULL, the function returns an error.

Certain tags are invalid XML. These include those with white space, non-alphanumeric characters, or numbers.
Output
Name Type Description
childElement CVIXMLElement On output, contains the handle to the element object obtained in this function. If the element does not exist, the output value is 0. This handle must be discarded using the CVIXMLDiscardElement 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:

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