node:unlink
March 26, 2020
Name
node:unlink — Unlink an XML node from its DOM container
Synopsis
require('xml');
node:unlink();
Description
Unlink an XML node from its DOM container. Call this function when you wish to save the node prior to its container being garbage collected. This function returns the XML node object.
local doc = xml.parsexml([[<doc><item/></doc>]]); local node = doc:root(); local node = node:unlink();