Getting values from XML node

I had a problem with getting value from element in XML. Here is My code :

_XML_Node := %XML_GetElementsByTagName(_Parent, _Element)
_XML_Node := %XML_Item(_XML_Node, 0)
_name := %XML_NodeName(_XML_Node) - name of the element is right, so i am on right spot in XML
_Value := %XML_NodeValue(_XML_Node) - returned values is empty String

after few tries to change my code if it will work, “somehow” i get this :

_XML_Node := %XML_GetElementsByTagName(_Parent, _Element)
_XML_Node := %XML_Item(_XML_Node, 0)
_XML_Node := %XML_ChildNodes(_XML_Node) - i am one level “deeper”, there should be nothing
_XML_Node := %XML_Item(_XML_Node, 0)
_Value := %XML_NodeValue(_XML_Node) - and there i get right value

This doesn’t make sense for me. Is it bug or there is some reason for that ? Or should i use another function for that, like %XML_GetElementText ?

Hello.
It is not a bug. It is a feature.
Your second part of ESL code is right.
Why ?
By definition (for example https://www.w3schools.com/Xml/xml_dom.asp) the text “abc” in the following example is child node of element

abc