Squirrel/Server/Functions/XmlDocument/Clear
From Liberty Unleashed Wiki
(Difference between revisions)
(Fixed title) |
m (Not a command, but a script) |
||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
− | This | + | This script will load an XML document into the scripts and empty it immediately. |
<code lang="squirrel"> | <code lang="squirrel"> |
Latest revision as of 14:29, 3 July 2013
This function empties an XML document.
[edit] Syntax
bool XmlDocument.Clear( )
[edit] Arguments
- None
[edit] Example
This script will load an XML document into the scripts and empty it immediately.
function onScriptLoad() { // Load the file itself local myDocument = XmlDocument(); myDocument.LoadFile( "Example.xml" ); // Empty it entirely myDocument.Clear(); }
[edit] Notes
The callback onScriptLoad and functions XmlDocument.LoadFile and XmlDocument were used in this example. More info about them is available in the corresponding pages.
[edit] Related Functions
- XmlDocument
- XmlDocument.Clear
- XmlDocument.FirstChild
- XmlDocument.LinkChild
- XmlDocument.LoadFile
- XmlDocument.Name
- XmlDocument.SaveFile
- XmlElement
- XmlElement.Clear
- XmlElement.FirstChild
- XmlElement.GetAttribute
- XmlElement.LinkChild
- XmlElement.LinkSibling
- XmlElement.Name
- XmlElement.NextSibling
- XmlElement.Parent
- XmlElement.RemoveAttribute
- XmlElement.RemoveChild
- XmlElement.RemoveSibling
- XmlElement.SetAttribute
- XmlElement.Text