Squirrel/Server/Functions/XmlDocument/Clear

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Initial writeup)
 
(Fixed title)
Line 1: Line 1:
{{Squirrel/Title|XmlDocument}}
+
{{Squirrel/Title|XmlDocument.Clear}}
 
This function empties an XML document.
 
This function empties an XML document.
  

Revision as of 14:25, 3 July 2013

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function empties an XML document.

Syntax

  1. bool XmlDocument.Clear( )

Arguments

  • None

Example

This command will load an XML document into the scripts and empty it immediately.

  1.  
  2. function onScriptLoad()
  3. {
  4. // Load the file itself
  5. local myDocument = XmlDocument();
  6. myDocument.LoadFile( "Example.xml" );
  7.  
  8. // Empty it entirely
  9. myDocument.Clear();
  10. }
  11.  

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.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox