<doc>
  <legacy_id>3080</legacy_id>
  <name>revXMLCopyNode</name>
  <type>command</type>
  <syntax>
    <example>revXMLCopyNode <i>treeId</i>, <i>sourceNode</i>, <i>destinationNode </i>[, <i>location</i>] [, <i>relationship</i>]</example>
  </syntax>
  <library>XML Library</library>
  <objects>
  </objects>
  <synonyms>revCopyXMLNode
  </synonyms>
  <classification>
  </classification>
  <references>
    <command tag="revXMLMoveNode">revXMLMoveNode Command</command>
  </references>
  <history>
    <introduced version="2.9">Added.</introduced>
    <changed version="6.5"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
    <disk access="???"/>
  </security>
  <summary>Duplicates a node in an XML tree and copies it to the specified position</summary>
  <examples>
    <example>-- Duplicates myNode and puts it after the original<p></p>revXMLCopyNode tTreeId, "root/myNode", "root/myNode", "after", "sibling"</example>
  </examples>
  <description>
    <p>Use the <b>revXMLCopyNode</b> command to create a duplicate of a node in an xml tree.</p><p/><p><b>Parameters:</b></p><p>The <i>treeId</i> is the number returned by the <function tag="revXMLCreateTree">revXMLCreateTree</function> or <function tag="revXMLCreateTreeFromFile">revXMLCreateTreeFromFile</function> function when you created the XML tree.</p><p/><p>The <i>sourceNode</i> is the path of the node to be copied.</p><p/><p>The <i>destinationNode</i> is the path of the node that the <i>sourceNode</i> will be copied either into or alongside.</p><p/><p>The <i>location</i> is 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"</p><p/><p>The <i>relationship</i> is either "sibling" or "child". This specifies the relationship that the <i>sourceNode</i> should have to the <i>destinationNode</i> after being copied. "sibling" means that the <i>sourceNode</i> will be placed alongside the <i>destinationNode</i>. "child" means that the <i>sourceNode</i> will be placed below the <i>destinationNode</i> (i.e. as a child of it). If no relationship is specified, the default is "child"</p><p/><p><font face="tahoma"><b>Comments:</b></font></p><p>If the <font face="tahoma"><b>revXMLCopyNode</b> command encounters an error, the result is set to an error message beginning with "xmlerr". </font></p><p/><p><font face="tahoma"><img src="202653"/> <b>Important!</b> The <b>revXMLCopyNode</b> <glossary tag="command">command</glossary> is part of the <glossary tag="XML library">XML library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section on the General screen of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure "XML Library" is selected in the list of script libraries.</font></p><p/>
  </description>
</doc>
