Function EN Version 10.01

@XMLGetName

XML

Syntax

@XMLGetName(XMLN);

Description

This @Function retrieves the name of an XML node.
The supplied handle must contain a valid VSPECHXMLNODE (XMLN) handle. The name of the node is returned as text.
If character set conversion is enabled for the XML handle, the returned name is converted accordingly.

VSPECHXMLNODE XMLN:
Handle of the XML node whose name is to be retrieved.
XMLN must contain a valid VSPECHXMLNODE (XMLN) handle that references an XML node.

Return Value:
On successful execution, the name of the XML node is returned as text.
If the XML node handle is invalid or an error occurs during character set conversion, the @Function returns @ERROR.

Example: @XMLGetName(XMLN);

XML := "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<customer>" +
" <name>Example GmbH</name>" +
" <city>Berlin</city>" +
"</customer>";

hXMLD := @XMLParse(XML);
hXMLRoot := @XMLGetRoot(hXMLD);
Name := @XMLGetName(hXMLRoot);
@XMLRelease(hXMLD);

The example retrieves the name of the root element. Name then contains the value "customer".

Note : This text was machine-translated and may contain inaccuracies.