Difference between revisions of "ISKernel:XMLSetting (Command)"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 3: Line 3:
  
 
== Description ==
 
== Description ==
 +
This command manipulates settings in an XML file.  XML setting files are first loaded, and then are in memory until unloaded.  They are not automatically saved when changing settings -- if you would like to save the file, you need to use XMLSetting -save.  Once a settings file is loaded in memory, you may use XMLSetting -set to change settings.  XMLSetting -get will display all sets, all settings in a set, or a given setting, depending on the parameters given.  To use an XML setting in a command, you need to use the [[ISSession:XMLSetting (Top-Level Object)|XMLSetting Top-Level Object]].
  
 
== Examples ==
 
== Examples ==
 +
*XMLSetting -load Settings.xml
 +
: Loads Settings.xml
 +
*XMLSetting -set Settings.xml "Chat Options" "Channel 1" ON
 +
: Sets the given setting to "ON"
 +
*XMLSetting -get Settings.xml
 +
: Lists all sets in Settings.xml
 +
*XMLSetting -get Settings.xml "Chat Options"
 +
: Lists all settings in the "Chat Options" set in Settings.xml
 +
*XMLSetting -get Settings.xml "Chat Options" "Channel 1"
 +
: Displays the value of the given setting
 +
*XMLSetting -save Settings.xml
 +
: Saves Settings.xml
 +
*XMLSetting -unload Settings.xml
 +
: Unloads Settings.xml
  
 
== See Also ==
 
== See Also ==

Revision as of 21:20, 23 April 2005

Syntax

XMLSetting -load <filename>|-save <filename>|-unload <filename>|-set <filename> <set> <setting> <value>|-get <filename> [set] [setting]

Description

This command manipulates settings in an XML file. XML setting files are first loaded, and then are in memory until unloaded. They are not automatically saved when changing settings -- if you would like to save the file, you need to use XMLSetting -save. Once a settings file is loaded in memory, you may use XMLSetting -set to change settings. XMLSetting -get will display all sets, all settings in a set, or a given setting, depending on the parameters given. To use an XML setting in a command, you need to use the XMLSetting Top-Level Object.

Examples

  • XMLSetting -load Settings.xml
Loads Settings.xml
  • XMLSetting -set Settings.xml "Chat Options" "Channel 1" ON
Sets the given setting to "ON"
  • XMLSetting -get Settings.xml
Lists all sets in Settings.xml
  • XMLSetting -get Settings.xml "Chat Options"
Lists all settings in the "Chat Options" set in Settings.xml
  • XMLSetting -get Settings.xml "Chat Options" "Channel 1"
Displays the value of the given setting
  • XMLSetting -save Settings.xml
Saves Settings.xml
  • XMLSetting -unload Settings.xml
Unloads Settings.xml

See Also