Name: revXMLRootNode

Type: function

Syntax: revXMLRootNode(<treeID>)

Summary: <return|Returns> the path to the starting node of an <XML tree>.

Introduced: 2.0

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Security: disk

Example:
revXMLRootNode(3)

Example:
put revXMLRootNode(thisTree) into myStartNode

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

Returns: The <revXMLRootNode> <function> returns a node path.

Description:
Use the <revXMLRootNode> <function> to get the path to an <XML tree|XML tree's> <root node>.

The root node is the starting node of the XML tree. The corresponding XML element is the one that contains all other elements in the XML document.

If the <revXMLRootNode> <function> encounters an error, it <return|returns> an error message starting with "xmlerr".

>*Important:*  The <revXMLRootNode> <function> is part of the <XML library>. To ensure that the <function> works in a <standalone application>, you must include this <Revolution custom library|custom library> when you create your <standalone application|standalone>. In the Inclusions section on the General screen of the <Standalone Application Settings> window, make sure "XML Library" is selected in the list of script libraries.

References: function (control_st), revXMLStartTree (message), revXMLDeleteNode (command), revXMLNextSibling (function), revXMLPreviousSibling (function), revXMLParent (function), revXMLFirstChild (function), Standalone Application Settings (glossary), root node (glossary), standalone application (glossary), XML tree (glossary), return (glossary), XML library (library), Revolution custom library (library)

Tags: text processing
