<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ChacalLoko</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ChacalLoko"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/ChacalLoko"/>
	<updated>2026-05-02T13:52:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlLoadFile&amp;diff=19277</id>
		<title>XmlLoadFile</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlLoadFile&amp;diff=19277"/>
		<updated>2009-04-24T23:09:12Z</updated>

		<summary type="html">&lt;p&gt;ChacalLoko: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function provides an alternative way to load XML files to [[getResourceConfig]].&lt;br /&gt;
This function loads an XML file and returns the node by specifying a specific file path, while [[getResourceConfig]] allows for loading an XML file from a resource.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
xmlnode xmlLoadFile ( string filename, [ resource fromResource = getThisResource () ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filename:''' the path to the file you wish to load.  This is a path relative to the current or specified resource root directory.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''fromResource:''' the [[resource]] whose directory will be used as the root for the filename specified.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
xmlnode xmlLoadFile ( string filename )              &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filename:''' The path to the file you wish to load.  This is a path relative to the clientside root folder of the resource found in your MTA San Andreas installation directory.'''.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the root [[xmlnode]] object of an xml file if successful, or ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example loads an XML file called ''test.xml''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
node = xmlLoadFile ( &amp;quot;test.xml&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{XML_functions}}&lt;/div&gt;</summary>
		<author><name>ChacalLoko</name></author>
	</entry>
</feed>