Please enable JavaScript to view this site.

 

Navigation: Scripts > XML > XML Scripts Editor

Examples of XML Script Manipulation

Scroll Prev Up Next More

This topic presents some examples of the 2 types of XML scripts manipulations.

 

Replacement of some of the values in a script.

Copying complex data structures between scripts or within the same script.

 

For a description of the various identifiers used, see the appendix on xml identifiers.

 

Simple Data Search and Replace

 

You can simple data structures, such as a font name, or a holidays set ID, between scripts or within the same script, using the XML Scripts Editor, which displays 2 xml script viewers, side-by-side

 

The option values replacement is used to replace the simple value of options throughout a script XML file, such as:

 

Replacing all uses of Arial with Arial MT Bold.

Replacing the holidays set 23213 with the holidays set 32109.

Replacing the GridTemplate of ID 1025 with the GridTemplate of ID 1988.

etc...

 

The modified XML file can then be re-loaded as the same script, or used to create a new script.

 

Copying Complex Structures

 

You can copy complex data structures between scripts or within the same script, using the XML Scripts Editor, which displays 2 xml script viewers, side-by-side.

 

 

The Replace button of the XML Scripts Editor is enabled, whenever compatible options are selected in both XML files, allowing you to copy the entire selection from the left to the right XML script file.

 

Example 1: Copying Holidays Sets

 

In this example example, we replace the entire a-Holidays, by the contents of the i-holidays, as shown below.

 

 

Example 2: Copying Macros Options

 

The concept of compatible options goes further. In the example below, the resulting actions if true of macro 1 are copied to the macro resulting actions if false of macro 4.

 

 

Example 3: Copying Font Settings in Minicalendar Options 

 

In the example below, the detailed fonts attributes, used for the current week dates, are copied to the holidays1 options.

 

 

 


Topic 184225, last updated on 11-Feb-2021