Name: revXMLFirstChild

Type: function

Syntax: revXMLFirstChild(<treeID>, <parentNode>, [ incText ])

Summary:
<return|Returns> the path to a node's first <child node>.

Associations: xml library

Introduced: 2.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Security: disk

Example:
revXMLFirstChild(1,"/State/City")

Example:
put revXMLFirstChild(thisTree,thisNode) into thisNode

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

parentNode:
The path to the node whose child node you want to find.

Returns:
The <revXMLFirstChild> <function> returns a <string> consisting of the
path to the first child node.

Description:
Use the <revXMLFirstChild> <function> to begin scanning the 
<child node|child nodes> of a <parent node>.

If the <revXMLFirstChild> <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 <revXMLFirstChild> <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), revXMLNextSibling (function),
revXMLChildNames (function), revXMLNumberOfChildren (function),
revXMLPreviousSibling (function), revXMLParent (function),
revXMLRootNode (function), LiveCode custom library (glossary),
Standalone Application Settings (glossary),
standalone application (glossary), return (glossary),
parent node (glossary), child node (glossary), string (keyword),
XML library (library)

Tags: text processing

