The Scripting Editor of XMLSpy uses the Form Editor components of the Microsoft .NET Framework, and thus provides access to the Microsoft .NET Framework. This means that JScripts and VBScripts not only work with the XMLSpy API—which is a COM API and the API of XMLSpy—but can also access and use classes of the Microsoft .NET framework.
You can therefore create and use your own macros and forms within XMLSpy, and thus add to and modify the functionality of your installation of XMLSpy.
|Note:||Microsoft's .NET Framework 2.0 or higher is a system prerequisite for Scripting Editor, and it must be installed before XMLSpy is installed.|
The Scripting Editor
The Scripting Editor (screenshot below) opens in a separate window and is accessed via the Tools | Scripting Editor menu command in the XMLSpy GUI. The programming languages that can be used in the Scripting Environment are JScript and VBScript. The scripting language can be changed by right-clicking the Project item in the Project window, selecting Scripting Language, and selecting the language you want.
In the Scripting Editor, you can create Forms, Event Handlers, and Macros to build up a Scripting Project. A Scripting Project can then be set as the Global Scripting Project for XMLSpy, thus enabling scripts in the Scripting Project to be used in the application. Additionally, different Scripting Projects can be assigned to different XMLSpy projects, thus allowing different scripts to be used for different XMLSpy projects.
Every script project can define the .NET runtime version it wants to use. An application can handle multiple scripting projects with different .NET runtime versions simultaneously, but the appropriate .NET version must be installed. For example, script projects with .NET 4.0 will only run on computers having .NET 4.0 installed.
Documentation about the Scripting Editor
The documentation describing the Scripting Environment (this section) is organized into the following parts:
|•||An overview, which provides a high level description of the Scripting Editor and Scripting Projects.|
|•||An explanation of Global Declarations, together with an example.|
|•||An explanation of how to use macros in the Scripting Editor and in XMLSpy.|
© 2018 Altova GmbH