XML_GET_NODE_NAME

ScriptEigener Objekttyp in der Automation Engine Function: Supplies the name of an element

Syntax

XML_GET_NODE_NAME (Reference)

Syntax

Description/Format

Reference

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


Return code

Name of the element

Comments

This script function may be used to read the name of an element in an XML document.

This script function requires a reference to be able to access the element. This reference is provided by script elements which can position within the XML document (e.g. XML_GET_FIRST_CHILD, XML_GET_NEXTSIBLING, or XML_SELECT_NODE).

XML_OPEN supplies a reference of the first element.

This script function can only process 1024 characters. Exceeding this limit has the effect that no return code is supplied. Keep this in mind when assigning element names.

Example

This example shown below retrieves all elements of one leve. Their names "Description" and "Contacts" are output in the activation log.

: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:

Script element Description

XML_GET_NODE_TEXT

Supplies the text of an element

Script Elements - Read or Modify Objects

Structured Documentation

www.w3c.org/TR/xmlbase

About Scripts
Script Elements - Alphabetical Listing

Script-Elements - Ordered by Function