Programming with Reflection
SaveXML method
Syntax object.SaveXML Filename, [Type], [IfFileExists], [Options]
Creates a file in XML format containing information about the current Reflection session. Use the Type and Options arguments to specify what information is written to this file.
For example, the following statement saves information about all changed settings to a file called Test.xml:
Session.SaveXML "C:\Mypath\Test.xml", rcXMLSettings, rcOverwrite, rcChanged
Filename Argument Type: String
Required
Specifies a name for the XML file. The file is saved to the current folder unless you provide path information.
Type Argument Type: Enumeration
Optional
Specifies what type of information to write to the XML file. The default is rcXMLSettings. The possible values are:
rcXMLSettings
Write all Reflection settings and the contents of the display memory.
rcXMLProperties
Write only those Reflections settings that are available as properties in the Reflection API.
rcXMLConnection
Write only the connection settings.
rcXMLColors
Write only the color settings.
rcXMLKeymap
Write only the keyboard mapping settings.
rcXMLMousemap
Write only the mouse mapping settings.
rcXMLMenus
Write only the menu settings (for both the main menu and the terminal window context menu).
rcXMLToolbars
Write only the toolbar settings.
rcXMLHotspots
Write only the hotspot settings.
rcXMLEvents
Write only the event settings.
rcXMLDisabled
Write only the commands, settings, and features that have been disabled using Reflection (see Methods and Properties for Restricting Access) or using the Reflection Profiler.
rcXMLFkeys
Write only the function key definitions.
rcXMLScreen
Write only the contents of the display memory.
rcXMLSettingsDTD
Write the settings DTD (Document Type Definition) file. This file describes the objects used when you create an XML file using SaveXML or using the Save As command on Reflection's File menu.
rcXMLScreenDTD
Write the DTD (Document Type Definition) file used for creating XML documents with screen display information. This file describes the objects used when you create an XML file using Copy, GetText, SaveDisplayMemory, or using the Save Display As command on Reflection's File menu.
IfFileExists Argument Type: Enumeration
Optional
Specifies what to do if the file exists. The default is rcCancel. The possible values are:
rcCancel
Generates an error if the file already exists.
rcAskUser
Prompts the user to either cancel or overwrite the file.
rcOverwrite
Overwrites the existing file.
Options Argument type: Enumeration
Optional
Specifies additional conditions for saving information. The default value is rcAll.
rcAll
Save information about all settings.
rcChanged
Save information about changed settings only.
rcEnumerations
lists all possible constants for each enumeration property. Use rcAll + rcEnumerations to list all possible constants for all enumeration properties.