revXMLChildNames |
Type | function |
Dictionary | LCS |
Library | LiveCode Script |
Syntax | revXMLChildNames(<treeID>, <startNode>, <nameDelim>, <childName>, <includeChildCount>, [incText])
|
Associations | xml library |
Summary | Returns a list of the child nodes under the
specified node in an XML tree.
|
Introduced | 2.0 |
OS | mac, windows, linux, ios, android |
Platforms | desktop, server, mobile |
Parameters | Name | Type | Description |
---|
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 | | Either true or false. If the includeChildCount is true, each node's name
is followed by the number of children it has, in brackets.
|
|
Example | revXMLChildNames(1,the currNode of me,comma,,false)
get revXMLChildNames(currTree,line 2 of theNodes,return,"Grass",true)
|
Values | |
Related | Control Structure: function
Function: revXMLNumberOfChildren, revXMLText, revXMLMatchingNode, revXMLFirstChild
Glossary: LiveCode custom library, return, XML tree, child node, Standalone Application Settings, standalone application, node, parent node
Library: XML library
|
Security | disk |
Description | Use the revXMLChildNames function to find out what childnodes are under a parent node.
If the revXMLChildNames function encounters an error, it
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
custom library when you create your
standalone. In the Inclusions pane of the
Standalone Application Settings window, make sure the "XML"
checkbox is checked.
|
Tags | text processing |