XML_GET_NEXTSIBLING

Script Function: Identifies the succeeding element

Syntax

XML_GET_NEXTSIBLING (Reference)

Syntax

Description/Format

Reference

Reference to the element whose successor is to be identified
Format: script literal or script variable

Return codes

Reference to the subsequent element of the same level
" " - There is no subsequent element.

This script function identifies the succeeding element on the same level in the XML document.

A handle must be given to the script function in order to access the succeeding element. Specific script elements use handles to position themselves within XML document and to edit it.

Tip: XML_GET_NEXTSIBLING identifies the succeeding element on the same level. Use XML_GET_FIRST_CHILD to identify the first sub-element. For more information, see XML_GET_FIRST_CHILD.

Example

Starting point for the following example is the first sub-element Description. All subsequent elements of the same level are retrieved and written to the activation report - here, it is the element Contacts.

:SET &XMLDOCU# = XML_OPEN(DOCU,"ON_CALL","@Details")

:
SET &HND# = XML_GET_FIRST_CHILD(&XMLDOCU#)

:   
WHILE &HND# <> ""
:      
SET &NAME# = XML_GET_NODE_NAME(&HND#)
:      
PRINT "element: &NAME#"
:      
SET &HND# = XML_GET_NEXTSIBLING(&HND#)
:  
 ENDWHILE

:
XML_CLOSE

See also:

seealso

Script Functions for XML Elements