ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. xmlNodeGetParent

Function

xmlNodeGetParent

Server and clientXMLIdentical to MTA:SA

Returns the node's parent.

Syntax

xmlnode xmlNodeGetParent(xmlnode node)

Arguments

nodexmlnode
The node.

Returns

The parent, or false for the root node.

Example

local root = xmlLoadString("<a><b/></a>")
local b = xmlFindChild(root, "b", 0)
outputDebugString(xmlNodeGetName(xmlNodeGetParent(b)))
xmlUnloadFile(root)

See also