revXMLCopyNode |
Type | command |
Dictionary | LCS |
Library | LiveCode Script |
Syntax | revXMLCopyNode <treeId>, <sourceNode>, <destinationNode> [, <location>] [, <relationship>]
|
Associations | xml library |
Summary | Duplicates a node in an XML tree and copies it to the specified position
|
Introduced | 2.9 |
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.
|
sourceNode | | The path of the node to be copied.
|
destinationNode | | The path of the node that the sourceNode will be copied either into or
alongside.
|
location | | Either "before" or "after" and determines whether the copied node should
be placed before or after its new sibling node. If no location is
specified, the default is "after"
|
relationship | | Either "sibling" or "child". This specifies the relationship that the
sourceNode should have to the destinationNode after being copied.
"sibling" means that the sourceNode will be placed alongside the
destinationNode. "child" means that the sourceNode will be placed below
the destinationNode (i.e. as a child of it). If no relationship is
specified, the default is "child"
|
|
Example |
revXMLCopyNode tTreeId, "root/myNode", "root/myNode", "after", "sibling"
|
Values | Name | Type | Description |
---|
The result | | If the revXMLCopyNode command encounters an error, the result is set
to an error message beginning with "xmlerr" . .
|
|
Related | Command: revXMLMoveNode
Glossary: Standalone Application Settings, standalone application, command, LiveCode custom library
Library: XML library
|
Security | disk |
Description | Use the revXMLCopyNode command to create a duplicate of a node in an
xml tree.
Important: The revXMLCopyNode 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.
|