XML_GET_PARENT_NODE ​
XML_GET_PARENT_NODE returns the ID of the parent node.
Syntax ​
leo-grammar
CC "Documentation" XML_GET_PARENT_NODE node:idValue [ level:intValue ]
#--> RESULT ecode:intValue parent:idValue .
Parameters ​
node
(idValue, optional) - ID of another node than the current for which to get an attribute.level
(intValue) - get the n-th parent: 1 for the direct parent, 2 for the parent of the parent, etc.; default is 1.
Returns ​
ecode
(intValue) - Contains the error code or is 0 in case of success; 3 - XML_NOPARSER - a file has to be opened first; 15 - XML_NODENOTEXISTING - the element with the specified id is not existing are already discarded from memory; 20 - XML_NODEHASNOPARENT - you tried to get the parent of the root node.parent
(idValue) - The ID of the parent node is returned via parent.
Details ​
Called within a callback procedure.
The ID of the parent node is returned via parent.
See Also ​
Examples ​
asc
# parse the xml string: <MAIN><SUB/></MAIN>
PROCEDURE PARSESUB {
CC "Documentation" XML_GET_PARENT_NODE
# returns id for <MAIN>
}
Versions and Changes ​
Available since ADOxx 1.3