<doc>
	<legacy_id>1720</legacy_id>
	<name>revXMLPreviousSibling</name>
	<type>function</type>

	<syntax>
		<example>revXMLPreviousSibling(<i>treeID</i>, <i>siblingNode, </i>[incText])</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary><glossary tag="return">Returns</glossary> the path to a child node's previous sibling node.</summary>

	<examples>
<example>revXMLPreviousSibling(22,"/City/Publisher")</example>
<example>put revXMLPreviousSibling(myDoc,thisNode) into thisNode</example>
	</examples>

	<history>
		<introduced version="2.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
		<disk/>
	</security>


	<classification>
		<category>Text and Data Processing</category>
		<category>Standalone Applications</category>
	</classification>

	<references>
		<function tag="revXMLFirstChild">revXMLFirstChild Function</function>
		<function tag="revXMLRootNode">revXMLRootNode Function</function>
	</references>

	<description>
	<overview>Use the <b>revXMLPreviousSibling</b> <control_st tag="function">function</control_st> to back up through the list of <property tag="nodes">nodes</property> on the current level.</overview>

		<parameters>
<parameter>
<name>treeID</name>
<description>The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree.</description>
</parameter>
<parameter>
<name>siblingNode</name>
<description>The path to the node where you want to start.</description>
</parameter>		</parameters>

	<value>The <b>revXMLPreviousSibling</b> <control_st tag="function">function</control_st> returns a string consisting of the path to the previous node with the same parent as the <i>siblingNode</i>. If there is no previous sibling node, the <b>revXMLPreviousSibling</b> <control_st tag="function">function</control_st> returns empty.</value>
	<comments>If the <b>revXMLPreviousSibling</b> <control_st tag="function">function</control_st> encounters an error, it <glossary tag="return">returns</glossary> an error message starting with "xmlerr".<p></p><p></p><note>If the <b>incText</b> 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.  </note><p></p><important>The <b>incText</b> form is experimental.</important><p></p><p></p><important>The <b>revXMLPreviousSibling</b><control_st tag="function">function</control_st> is part of the <glossary tag="XML library">XML library</glossary>. To ensure that the <control_st tag="function">function</control_st> 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.</important></comments>
	</description>
</doc>