revXMLParent

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
revXMLParent(<treeID>, <childNode>)
Associationsxml library
Summary

Returns the path to the parent node of a node in an XML tree.

Introduced2.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
treeID

The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree.

childNode

The path to the node where you want to start.

Example
revXMLParent(1,"/City/Publisher")
put revXMLParent(thisTree,thisNode) into field "Parent"
Values
NameTypeDescription
return

The revXMLParent function returns a string consisting of the path to the parent node of the childNode. If the childNode is the root node of the XML tree (and therefore has no parent), the revXMLParent function returns empty.

RelatedControl Structure: function
Function: revXMLRootNode, revXMLFirstChild, revXMLCreateTree, revXMLCreateTreeFromFile
Glossary: LiveCode custom library, node, Standalone Application Settings, standalone application, return, XML tree, parent node
Library: XML library
Securitydisk
Description

Use the revXMLParent function to go up one level in an XML tree.

If the revXMLParent function encounters an error, it returns an error message starting with "xmlerr".

Important: The revXMLParent function is part of the XML library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.

Tagstext processing