XML:setName(path,name)

Change the name of an element to the specified name. If only one argument is specified, the name of the current element will be changed. If two arguments are specified, the first argument is used as a path to an element and the second argument is used as the element's name.

Example

doc = xml.parse([[<options><host>127.0.0.1</host></options>]])
doc:setName('/options', 'configuration')