XmlNodeGetName: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Needs example)
Line 14: Line 14:
Returns the tag name of the node if successful, ''false'' otherwise.
Returns the tag name of the node if successful, ''false'' otherwise.


<section name="Example 1" class="both" show="true">
==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--TODO
local xml = xmlCreateFile("test.xml","test")
local xmlNode = xmlCreateChild(xml,"nextTest")
local xmlNodeName = xmlNodeGetName(xmlNode)
outputConsole(xmlNodeName) --This should output "nextTest".
</syntaxhighlight>
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{XML functions}}
{{XML functions}}
[[Category:Needs Example]]
[[Category:Needs Example]]

Revision as of 19:48, 11 December 2012

Gets the tag name of the specified XML node.

Syntax

string xmlNodeGetName ( xmlnode node )

Required Arguments

  • node: the node to get the tag name of.

Returns

Returns the tag name of the node if successful, false otherwise.

Click to collapse [-]
Example 1

Example

local xml = xmlCreateFile("test.xml","test")
local xmlNode = xmlCreateChild(xml,"nextTest")
local xmlNodeName = xmlNodeGetName(xmlNode)
outputConsole(xmlNodeName) --This should output "nextTest".

See Also