Error getting tags :
error 404Error getting tags :
error 404 revXMLTree | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
revXMLTree
Basics
Expander triangle
Type
Function
Syntax

revXMLTree(treeID,startNode,nodeDelim,padding,includeChildCount,depth)

Introduced
2.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Disk
Summary
Returns a list of the nodes in an XML tree, in a form that shows their parent/child relationships.
Examples

revXMLTree(3,"/Sound",return,space,false,1)
revXMLTree(currTree,foundNode,space,,true,2)
put revXMLTree(myTree,theNode,return,tab,false,-1) into field "Node List"

Additional Comments
Expander triangle

Use the revXMLTree function to obtain a text "tree-style" view of an XML tree's nodes.

Parameters:

The treeID is the number returned by the revCreateXMLTree or revCreateXMLTreeFromFile function when you created the XML tree.

The startNode is the path to the node where you want to start.

The nodeDelim is a string that separates each node's name from the rest.

The padding is a string that is placed before the name of each node to show its depth in the tree. No padding is placed before the startNode's name.

The includeChildCount is true or false. If the includeChildCount is true, each node's name is followed by the node's positional predicate, ie which child number the node is.

The depth specifies how many generations of the XML tree to show. If you specify zero, only the startNode is shown; if you specify 1, the startNode and its child nodes are shown, but not their child nodes; and so on. To show all generations, specify -1 as the depth.

Value:

The revXMLTree function returns a string.

Comments:

To display the entire XML tree, specify the root node returned by the revXMLRootNode function as the startNode.

Typically, you use return as the nodeDelimiter and tab as the padding. The resulting list of nodes is displayed one node per line, with as many leading tabs as the node's depth.

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

Important! The revXMLTreefunction 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 section on the General screen of the Standalone Application Settings window, make sure "XML Library" is selected in the list of script libraries.

User Comments
Expander triangle