LabWindows/CVI

Table of Contents
  • LabWindows/CVI Fundamentals
  • Creating Applications
  • Distributing Applications
  • Library Reference
  • Programmer Reference
  • Hardware Information

CVIXMLGetChildElementByIndex

CVIXMLStatus CVIXMLGetChildElementByIndex (CVIXMLElement element, int index, CVIXMLElement *childElement);

Purpose

Gets an element's child at the specified position. If the element does not exist at the index, an error is returned.

Parameters

Input
Name Type Description
element CVIXMLElement The element handle must be a valid CVIXMLElement.
index int The zero-based index where the element is located under the parent element. Pass –1 to get the last element. The index refers to the position of XML elements and does not include other XML entities.
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 at the index, an error is returned. 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

Examples

Refer to the following examples that use the CVIXMLGetChildElementByIndex function:

  • apps\xmlTree\xmlTree.cws

    Open example
  • toolbox\XMLSample.cws

    Open example

Log in to get a better experience