XmlUnloadFile: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (fix oop syntax)
 
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:Incomplete]]
{{Server client function}}
 
__NOTOC__
__NOTOC__  
Unloads an XML document from memory.
This fake function is for use with blah & blah and does blahblahblabhalbhl


==Syntax==  
==Syntax==  
<syntaxhighlight lang="xml">
<syntaxhighlight lang="lua">
bool xmlUnloadFile ( xmlnode xmlnode )               
bool xmlUnloadFile ( xmlnode node )               
</syntaxhighlight>  
</syntaxhighlight>  
 
{{OOP||[[xmlnode]]:unload}}
===Required Arguments===  
===Required Arguments===  
*'''argumentName:''' description
*'''node:''' root of the XML document to unload
 
===Optional Arguments===
{{OptionalArg}}
*'''argumentName2:''' descriptiona
*'''argumentName3:''' description


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
Returns ''true'' if the document was unloaded successfully, ''false'' otherwise.


==Example==  
==Example==  
This example does...
Modify a configuration file.
 
config.xml:
<syntaxhighlight lang="xml">
<config>
    <markers color="255,100,0" />
</config>
</syntaxhighlight>
 
Lua code:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
xml = xmlLoadFile("config.xml")
blabhalbalhb --abababa
markernode = xmlFindChild(xml, "markers", 0)
--This line does this...
xmlNodeSetAttribute(markernode, "color", "0,0,200")
mooo
xmlSaveFile(xml)
xmlUnloadFile(xml)
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{FunctionArea_Functions}}
{{XML_functions}}
[[ru:xmlUnloadFile]]

Latest revision as of 20:16, 2 January 2015

Unloads an XML document from memory.

Syntax

bool xmlUnloadFile ( xmlnode node )               

OOP Syntax Help! I don't understand this!

Method: xmlnode:unload(...)


Required Arguments

  • node: root of the XML document to unload

Returns

Returns true if the document was unloaded successfully, false otherwise.

Example

Modify a configuration file.

config.xml:

<config>
    <markers color="255,100,0" />
</config>

Lua code:

xml = xmlLoadFile("config.xml")
markernode = xmlFindChild(xml, "markers", 0)
xmlNodeSetAttribute(markernode, "color", "0,0,200")
xmlSaveFile(xml)
xmlUnloadFile(xml)

See Also