XmlCreateSubNode: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Changed description, fixed syntax, added argument descriptions, added return info, added categories)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
This function returns a named sub node of a particular XML node.
This function creates a subnode for a specified XML node.


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">xmlnode xmlCreateSubNode ( xmlnode, tagname )</syntaxhighlight>
<syntaxhighlight lang="lua">xmlnode xmlCreateSubNode ( xmlnode parentNode, string tagname )</syntaxhighlight>


===Required Arguments===  
===Required Arguments===  
<!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type -->
*'''parentNode:''' the [[xmlnode]] you want to create a subnode of.
*'''argumentName:''' description
*'''tagname:''' the type of the subnode that will be created.
 
<!-- Only include this section below if there are optional arguments -->
===Optional Arguments===
{{OptionalArg}}
*'''argumentName2:''' description
*'''argumentName3:''' description


===Returns===
===Returns===
Returns a table of resources.
Returns the created [[xmlnode]] if successful, ''false'' otherwise.


==Example==
==Example==
This function lists all loaded resources in the console.
[[Category:Needs Example]]
<syntaxhighlight lang="lua">
function blabla ()
    --this does blabla
end
</syntaxhighlight>


==See Also==
==See Also==
{{XML functions}}
{{XML functions}}
[[Category:Incomplete]]

Revision as of 11:05, 20 October 2007

This function creates a subnode for a specified XML node.

Syntax

xmlnode xmlCreateSubNode ( xmlnode parentNode, string tagname )

Required Arguments

  • parentNode: the xmlnode you want to create a subnode of.
  • tagname: the type of the subnode that will be created.

Returns

Returns the created xmlnode if successful, false otherwise.

Example

See Also