Error getting tags :
error 404Error getting tags :
error 404 revXMLChildNames | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
revXMLChildNames
Basics
Expander triangle
Type
Function
Syntax
revXMLChildNames(treeID,startNode,nameDelim,childName,includeChildCount)
Introduced
2.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Disk
Summary
Returns a list of the child nodes under the specified node in an XML tree.
Examples

revXMLChildNames(1,the currNode of me,comma,,false)
get revXMLChildNames(currTree,line 2 of theNodes,return,"Grass",true)

Additional Comments
Expander triangle

Use the revXMLChildNames function to find out what child nodes are under a parent node.

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 whose child nodes you want to list.

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

The childName is a string specifying which child nodes to list. If it is empty, all child nodes are listed. Otherwise, only child nodes whose name matches the childName are listed.

The includeChildCount is true or false. If the includeChildCount is true, each node's name is followed by the number of children it has, in brackets.

Value:

The revXMLChildNames function returns a string.

Comments:

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

Important! The revXMLChildNamesfunction 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
User thumbnail
benr_mc@cogapp.com
StarStarStarStarStar
Oct 13, 2010
Note: description of includeChildCount above is incorrect. "If the includeChildCount is true, each node's name is followed by the number of children it has, in brackets". In fact, if this parameter is true, then each node's name is followed by the index to that child - ie the data you need to reliably construct a path to it, if there is more than one child with the same name. So if a node has children a, b, a, then with this parameter the return value will be "a[1], b[1], a[2]".