Programming with Reflection

image\rwnprg32.gif 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
Specifies a name for the XML file. The file is saved to the current folder unless you provide path information.

Type Argument Type: Enumeration
Specifies what type of information to write to the XML file. The default is rcXMLSettings. The possible values are:


 Write all Reflection settings and the contents of the display memory.


 Write only those Reflections settings that are available as properties in the Reflection API.


 Write only the connection settings.


 Write only the color settings.


 Write only the keyboard mapping settings.


 Write only the mouse mapping settings.


 Write only the menu settings (for both the main menu and the terminal window context menu).


 Write only the toolbar settings.


 Write only the hotspot settings.


 Write only the event settings.


 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.


 Write only the function key definitions.


 Write only the contents of the display memory.


 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.


 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
Specifies what to do if the file exists. The default is rcCancel. The possible values are:


 Generates an error if the file already exists.


 Prompts the user to either cancel or overwrite the file.


 Overwrites the existing file.

Options Argument type: Enumeration
Specifies additional conditions for saving information. The default value is rcAll.


 Save information about all settings.


 Save information about changed settings only.


 lists all possible constants for each enumeration property. Use rcAll + rcEnumerations to list all possible constants for all enumeration properties.



image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command