node[index]

Allows to get a child node using table indexation using a number (the position of the node inside its parent). Returns the matching child Node or nil.

Example

--! luart-extensions import xml xml = require("xml") local root = xml.Node("root") root:add("title", "The Wonderful Wizard of Oz") root:add("author", "Lyman Frank Baum") print(root[1].content) -- 'The Wonderful Wizard of Oz'