<doc>
  <legacy_id>3079</legacy_id>
  <name>revXMLMoveNode</name>
  <type>command</type>
  <syntax>
    <example>revXMLMoveNode treeID, <i>sourceNode</i>, <i>destinationNode [</i>, <i>location] [</i>, <i>relationship]</i></example>
  </syntax>
  <library>XML Library</library>
  <objects>
  </objects>
  <synonyms>revMoveXMLNode
  </synonyms>
  <classification>
  </classification>
  <references>
    <function tag="revXMLCreateTree">revXMLCreateTree Function</function>
    <command tag="revXMLAddNode">revXMLAddNode Command</command>
    <command tag="revXMLCopyNode">revXMLCopyNode 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>Moves a node in an XML tree to the specified position</summary>
  <examples>
    <example>revXMLMoveNode tTreeId, "root/MyNode", "root/MyNode2", "after", "sibling"</example>
    <example>revXMLMoveNode tTreeId, tTargetNode, tDestinationNode, "before", "child"</example>
  </examples>
  <description>
    <p>Use the <b>revXMLMoveNode</b> command to move 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 moved</p><p/><p>The <i>destinationNode</i> is the path of the node that the <i>sourceNode</i> will be moved either into or alongside.</p><p/><p>The <i>location</i> is either "before" or "after" and determines whether the moved node should be placed before or after its new sibling node. If no <i>location</i> 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>. "sibling" means that the <i>sourceNode</i> will be placed <b>alongside</b> the <i>destinationNode</i>. "child" means that the <i>sourceNode</i> will be placed <b>below</b> the <i>destinationNode</i> (i.e. as a child of it). If no <i>relationship</i> is specified the default is "child"</p><p/><p><b>Comments:</b></p><p>If the <b>revXMLMoveNode</b> command encounters an error, the result is set to an error message beginning with "xmlerr". </p><p/><p><font face="tahoma"><img src="202653"/> <b>Important!</b> The <b>revXMLMoveNode</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>
  </description>
</doc>
