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

revXMLNumberOfChildren(3,myNode,,-1)
repeat for revXMLNumberOfChildren(theTree,theNode,"Book",1) times

Additional Comments
Expander triangle

Use the revXMLNumberOfChildren function to find out how many child nodes a parent node has, or to find out how many of a particular kind of child nodes it has.

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 count.

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

The depth specifies how many generations to count. If you specify 0, only the parentNode's direct child nodes are counted, but not their child nodes. If you specify 1, the parentNode's child nodes are counted, along with their child nodes. To count all generations, specify -1 as the depth.

Value:

The revXMLNumberOfChildren function returns a non-negative integer.

Comments:

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

Important! The revXMLAddElementfunction 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