XmlDocument.Clear

From Liberty Unleashed Wiki
Revision as of 14:29, 3 July 2013 by Stormeus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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 script 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