<doc>
	<legacy_id></legacy_id>
	<name>revXMLCreateTreeFromFileWithNamespaces</name>
	<type>function</type>

	<syntax>
		<example>revXMLCreateTreeFromFileWithNamespaces(<i>filePath</i>,<i>parseBadData</i>,<i>createTree</i>,<i>sendMessages</i>)</example>
	</syntax>

	<synonyms>revXMLCreateTreeFromFileWithNamespaces
	</synonyms>

	<summary>Reads an <glossary tag="XML">XML</glossary> <keyword tag="file">file</keyword>, optionally creating an <glossary tag="XML tree">XML</glossary> tree and returning XML namespace tags and attributes as part of the tree.</summary>

	<examples>
<example>revXMLCreateTreeFromFileWithNamespaces(&quot;New.xml&quot;,false,true,false)</example>
<example>if revXMLCreateTreeFromFileWithNamespaces(it,true,true,false) then next repeat</example>
	</examples>

	<history>
		<introduced version="4.5.1">Added.</introduced>
    		<changed version="6.5"></changed>
		<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="revXMLValidateDTD">revXMLValidateDTD Function</function>
		<function tag="revXMLTrees">revXMLTrees Function</function>
		<function tag="revXMLCreateTreeWithNamespaces">revXMLCreateTreeWithNamespaces Function</function>
		<command tag="revXMLAppend">revXMLAppend Command</command>
		<command tag="revXMLDeleteAllTrees">revXMLDeleteAllTrees Command</command>
		<message tag="revXMLStartTree">revXMLStartTree Message</message>
	</references>

	<description>
	<overview>Use the <b>revXMLCreateTreeFromFileWithNamespaces</b> <control_st tag="function">function</control_st> to read the contents of an <glossary tag="XML document">XML document</glossary> and create an <glossary tag="XML tree">XML tree </glossary>from it in memory, XML namespace tags and attributes are included as part of the tree.</overview>

		<parameters>
		<parameter>The <i>filePath</i> is the name and location of a file containing <a name="glossary tag=XML">XML</a> text.</parameter>
		<parameter>The <i>parseBadData</i> is true or false.</parameter>
		<parameter>The <i>createTree</i> is true or false.</parameter>
		<parameter>The <i>sendMessages</i> is true or false.</parameter>
		</parameters>

	<value>The <b>revXMLCreateTreeFromFileWithNamespaces</b> <control_st tag="function">function</control_st> returns a tree ID which can be used to refer to the tree in other <glossary tag="XML library">XML library</glossary> <glossary tag="command">commands</glossary> and <glossary tag="function">functions</glossary>. The tree ID is always a positive <keyword tag="integer">integer</keyword>. (If the <i>createTree</i> is false, the <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> zero.)<p></p><p>If the function encounters an error while parsing the file, it returns an error message beginning with &quot;xmlerr&quot;.</p></value>
	<comments>Use the <b>revXMLCreateTreeFromFileWithNamespaces</b> function to make and XML file into an XML Tree,  ignoring XML Namespace related tags and functions. The <b>revXMLCreateTreeFromFileWithNamespaces</b> function returns namespace tags and attributes as part of the tree without doing any processing.<p></p><p>Use the <b>revXMLCreateTreeFromFileWithNamespaces</b> function when an application needs the namespace information to perform correctly.</p><p></p><p>If the <i>parseBadData</i> is true, the <b>revXMLCreateTreeFromFileWithNamespaces</b> <control_st tag="function">function</control_st> tries to parse <glossary tag="XML">XML</glossary> data even if it is not well-formed. Otherwise, the <control_st tag="function">function</control_st> stops executing as soon as it encounters data that is not well-formed <glossary tag="XML">XML</glossary>.</p><p></p><p>If the <i>createTree</i> is true, the <control_st tag="function">function</control_st> creates a tree structure in memory. Otherwise, the <control_st tag="function">function</control_st> simply parses the <glossary tag="XML">XML</glossary> data without creating an <glossary tag="XML tree">XML tree</glossary>.</p><p></p><p>If the <i>sendMessages</i> is true, the <message tag="revXMLStartTree">revXMLStartTree</message>, <message tag="revStartXMLNode">revStartXMLNode</message>, <message tag="revStartXMLData">revStartXMLData</message>, <message tag="revEndXMLNode">revEndXMLNode</message>, and <message tag="revXMLEndTree">revXMLEndTree</message> <glossary tag="message">messages</glossary> are sent while the <keyword tag="file">file</keyword> is being parsed. Otherwise, these <glossary tag="message">messages</glossary> are not sent.</p><p></p><p>If the <b>revXMLCreateTreeFromFileWithNamespaces</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><code tag=""><important></code><code tag=""> The </code><b>revXMLCreateTreeFromFileWithNamespaces </b>function 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>
