Node:remove()method
Detaches the current Node from its parent node. If the node has no parent, the operation does nothing.
Return value
Returnstrue if the node was removed, or false if it had no parent.
Example
--! luart-extensions
import xml
xml = require("xml")
local root = xml.Node("root")
local title = root:add("title", "Hello")
print(#root) -- 1
print(title:remove()) -- true
print(#root) -- 0