Name: revXMLChildNames

Type: function

Syntax: revXMLChildNames(<treeID>, <startNode>, <nameDelim>, <childName>, <includeChildCount>, [incText])

Summary:
<return|Returns> a list of the <child node|child nodes> under the
specified <node> in an <XML tree>.

Associations: xml library

Introduced: 2.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Security: disk

Example:
revXMLChildNames(1,the currNode of me,comma,,false)

Example:
get revXMLChildNames(currTree,line 2 of theNodes,return,"Grass",true)

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

startNode:
The path to the node whose child nodes you want to list.

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

childName:
The 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.

includeChildCount (bool):
Either true or false. If the includeChildCount is true, each node's name
is followed by the number of children it has, in brackets.

Returns:
The <revXMLChildNames> <function> returns a string.

Description:
Use the <revXMLChildNames> <function> to find out what <child node|child
nodes> are under a <parent node>.

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

>*Note:* If the incText form is specified and is true the function will
> return text nodes in processing. Text nodes can be accessed using the
> revXMLNodeContents function with the extended path format where text
> only nodes are numerically indexed eg summary/command/[1] is the first
> text node of the summary/command node.

>*Important:* The incText form is experimental.

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

References: function (control structure),
revXMLNumberOfChildren (function), revXMLText (function),
revXMLMatchingNode (function), revXMLFirstChild (function),
LiveCode custom library (glossary), return (glossary),
XML tree (glossary), child node (glossary),
Standalone Application Settings (glossary),
standalone application (glossary), node (glossary),
parent node (glossary), XML library (library)

Tags: text processing

