Function EN Version 10.01

@XMLGetNextSibling

XML

Syntax

@XMLGetNextSibling(XMLN);

Description

This @Function retrieves the next XML sibling element of an XML node.
Only XML elements are considered. Other node types, such as text, comment, or CDATA nodes, are skipped.
The flags inherited from the supplied XML node handle are also applied to the returned XML node handle.

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

Return-Wert:
If a following sibling element is found, the @Function returns a VSPECHXMLNODE (XMLN) handle referencing the next XML sibling element.
If no further sibling element exists or the supplied XML node handle is invalid, the @Function returns @ERROR.

Example: @XMLGetNextSibling(XMLN);

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

hXMLD := @XMLParse(XML);
hXMLRoot := @XMLGetRoot(hXMLD);
hXMLName := @XMLGetFirstChild(hXMLRoot);
hXMLCity := @XMLGetNextSibling(hXMLName);
Name := @XMLGetName(hXMLCity);
@XMLRelease(hXMLD);

The example first retrieves the first child XML element and then its next sibling element. Name then contains the value "city".

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