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

Function

xmlNodeGetAttributes

Server and clientXMLIdentical to MTA:SA

Returns all node attributes as a name → value table.

Syntax

table xmlNodeGetAttributes(xmlnode node)

Arguments

nodexmlnode
The node.

Returns

A table of attributes, or false.

Example

local root = xmlLoadString('<spawn x="1" y="2" z="3" skin="0"/>')
for name, value in pairs(xmlNodeGetAttributes(root)) do outputDebugString(name .. "=" .. value) end
xmlUnloadFile(root)

See also