<doc>
	<legacy_id>1145</legacy_id>
	<name>revXMLText</name>
	<type>function</type>

	<syntax>
		<example>revXMLText(<i>treeID </i>[,<i>startNode</i>] [, <i>formatted</i>])</example>
	</syntax>
	<library>XML library</library>

	<synonyms>
	</synonyms>

	<summary><glossary tag="return">Returns</glossary> the contents of an <glossary tag="XML tree">XML tree</glossary> as XML text.</summary>

	<examples>
<example>revXMLText(12)</example>
<example>revXMLText(the xmlID of this card,&quot;/Plants/Trees&quot;)</example>
<example><p>put revXMLText(tTreeId, ,true) into URL &quot;file:New Customers.xml&quot;</p></example>
	</examples>

	<history>
		<introduced version="2.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
	</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="revXMLChildNames">revXMLChildNames Function</function>
		<function tag="revXMLAttributes">revXMLAttributes Function</function>
		<function tag="revXMLTree">revXMLTree Function</function>
		<command tag="revXMLAppend">revXMLAppend Command</command>
	</references>

	<description>
	<overview>Use the <b>revXMLText</b> <control_st tag="function">function</control_st> to turn an <glossary tag="XML tree">XML tree</glossary> back into an <glossary tag="XML document">XML document</glossary>.</overview>

		<parameters>
<parameter>
<name>treeID</name>
<description>The the number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree.</description>
</parameter>
<parameter>
<name>startNode</name>
<description>The path to the node where you want to start. If you don't specify a startNode, the revXMLText function starts at the root node and returns the entire XML tree.</description>
</parameter>
<parameter>
<name>formatted</name>
<description>Whether or not to produce xml with indenting and line breaks, i.e. "pretty-printed". If you don't specify a formatted value, the default is not to format the text, this will  result in the xml being output as a single block with no line breaks.
</description>
</parameter>		</parameters>

	<value>The <b>revXMLText</b> function returns XML text.</value>
	<comments>If the <b>revXMLText</b> <control_st tag="function">function</control_st> encounters an error, it <glossary tag="return">returns</glossary> an error message starting with &quot;xmlerr&quot;.<p></p><p></p><important>The <b>revXMLText</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 &quot;XML Library&quot; is selected in the list of script libraries.</important></comments>
	</description>
</doc>