- Documentation
- Shared functions
- xmlNodeGetChildren
Function
xmlNodeGetChildren
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)