revXMLAddNode |
Type | command |
Dictionary | LCS |
Library | LiveCode Script |
Syntax | revXMLAddNode <treeID>, <parentNode>, <nodeName>, <nodeContents>, [<location>]
|
Associations | xml library |
Summary | Adds a child node to the specified parent 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.
|
parentNode | | The node whose child the node being created will be.
|
nodeName | | The name of the new node.
|
nodeContents | | The text to place in the new node.
|
location | | An optional argument. If it is not present or if it is equal to "after",
the node will be added as the last child of parentNode. If location is
"before" then the node will be added as the first child of parentNode.
|
|
Example | revXMLAddNode 9,"/","Balls",""
revXMLAddNode myTree,theNode,the short name of me,field "Contents"
|
Values | Name | Type | Description |
---|
The result | | If the revXMLAddNode command encounters an error, the result is
set to an error message beginning with "xmlerr".
|
|
Related | Command: revXMLMoveNode, revXMLDeleteNode, revXMLAppend
Function: result, revXMLCreateTree, revXMLCreateTreeFromFile
Glossary: node, Standalone Application Settings, standalone application, XML tree, command, child node, LiveCode custom library
Library: XML library
|
Security | disk |
Description | Use the revXMLAddNode command to add a node to an XML tree.
Important: The revXMLAddNode command is part of the
XML library. To ensure that the command 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 |