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

Function

xmlNodeGetChildren

Server and clientXMLIdentical to MTA:SA

Without an index returns a table of all the node's children; with an index (from 0) - one child.

Syntax

table xmlNodeGetChildren(xmlnode parent [, int index = nil])

Arguments

parentxmlnode
The node.
indexint, optional = nil
Child number from 0.

Returns

A table of nodes (or one node, or false).

Example

local root = xmlLoadString("<list><a/><b/><c/></list>")
for i, child in ipairs(xmlNodeGetChildren(root)) do
    outputDebugString(i .. ": " .. xmlNodeGetName(child))
end
xmlUnloadFile(root)

See also