- Documentation
- Shared functions
- xmlUnloadFile
Function
xmlUnloadFile
Frees a document from memory. All its nodes become invalid. Unsaved changes are lost.
Syntax
bool xmlUnloadFile(xmlnode node)Arguments
nodexmlnode- The document's root node.
Returns
true on success.
Example
local root = xmlLoadFile("data.xml", true)
if root then xmlUnloadFile(root) end
See also
xmlLoadFileLoads an XML file and returns its root node, from which you can read children and attributes. On the server the path is relative to the resource folder (you cannot leave it). On the client it reads the script's own files and then<file>files sent by the server; a":other/file.xml"path points to another resource's file. RememberxmlUnloadFilewhen the document is no longer needed.xmlSaveFileSaves the whole document (that the node belongs to) to its file. Does not work for read-only documents or those fromxmlLoadString.