XmlNodeGetName: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Server client function}} Gets the tag name of the specified XML node. ==Syntax== <syntaxhighlight lang="lua"> string xmlNodeGetName ( xmlnode node ) </syntaxhighlight> ===Required Arguments=== *'''node:...) |
m (Moved Example header to upper layer) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 7: | Line 7: | ||
string xmlNodeGetName ( xmlnode node ) | string xmlNodeGetName ( xmlnode node ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[xmlnode]]:getName|name|xmlNodeSetName}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''node:''' the node to get the tag name of. | *'''node:''' the node to get the tag name of. | ||
Line 13: | Line 13: | ||
===Returns=== | ===Returns=== | ||
Returns the tag name of the node if successful, ''false'' otherwise. | Returns the tag name of the node if successful, ''false'' otherwise. | ||
==Example== | |||
<section name="Example 1" class="both" show="true"> | |||
<syntaxhighlight lang="lua"> | |||
local xml = xmlCreateFile("test.xml","test") | |||
local xmlNode = xmlCreateChild(xml,"nextTest") | |||
local xmlNodeName = xmlNodeGetName(xmlNode) | |||
xmlUnloadFile(xml) | |||
outputConsole(xmlNodeName) --This should output "nextTest". | |||
</syntaxhighlight> | |||
</section> | |||
==See Also== | ==See Also== | ||
{{XML functions}} | {{XML functions}} | ||
[[ru:xmlNodeGetName]] |
Latest revision as of 19:40, 12 February 2021
Gets the tag name of the specified XML node.
Syntax
string xmlNodeGetName ( xmlnode node )
OOP Syntax Help! I don't understand this!
- Method: xmlnode:getName(...)
- Variable: .name
- Counterpart: xmlNodeSetName
Required Arguments
- node: the node to get the tag name of.
Returns
Returns the tag name of the node if successful, false otherwise.
Example
Click to collapse [-]
Example 1local xml = xmlCreateFile("test.xml","test") local xmlNode = xmlCreateChild(xml,"nextTest") local xmlNodeName = xmlNodeGetName(xmlNode) xmlUnloadFile(xml) outputConsole(xmlNodeName) --This should output "nextTest".