Node:constructor(name, [content])constructor
Creates a new Node object instance to represent an XML element with child nodes, attributes and text content.
Parameters
name
The name of the XML element , as a string
[content]
Optional text content of the XML element, as a string
Return value
Returns a new Node object instance.Example
--! luart-extensions
import xml
local root = xml.Node("greeting", "Hello")
print(root.text) -- Hello