Editing configuration resources in XML

The editors in Guidewire Studio provide a visual editing environment for many resources. In addition to using the visual editors, you can also edit the underlying XML code that defines the resource. Guidewire recommends that you edit the XML code only within Studio, and that you do not edit it in an external editor.

Edit the XML definition of Studio resources

Edit the XML that defines configuration files, rather than editing them in the visual editor.

Procedure

  1. Open the resource in the Studio editor.
  2. At the bottom of the editor pane, click the Text tab. The XML definition is shown in the editor pane.
  3. Modify the XML as desired.
  4. To switch back to the visual editor, click the tab next to the Text tab that shows the type of the resource that you are editing.

What to do next

Make sure that the XML remains valid, and that you do not introduce any syntax errors. If the XML contains errors, the representation of the resource in the visual editor may not be accurate.

Automatically sort XML-based resource files

Keep the XML files for certain configuration resources sorted to make it easier to identify meaningful differences in edited versions.

About this task

Each time you edit an XML-based configuration resource in Guidewire Studio, Studio saves the XML to a configuration file. The order of the XML elements in the file typically changes based on the order in which they appear in the Studio editor. Instead, you may prefer to have the contents of the file sorted in a consistent way. This can help you identify functional differences between versions without viewing structural differences. For example, if you change the order of display keys in the Studio editor, then the saved XML would by default also save the different ordering. However, if Studio sorts the XML in a consistent way, then there would be no change to the file.
You can automatically sort the files for the following resources:
  • display keys
  • entities
  • typelists

Procedure

  1. In Guidewire Studio, click File > Settings.
  2. In the Settings dialog, navigate to Guidewire Studio.
  3. To keep the resource files sorted, set the Automatically sort display key, entity, and typelist files check box.

Set the file size limit for metadata editors

Configure Studio to open large metadata files in the XML editor instead of the associated visual editor.

About this task

Metatdata files appear in Studio in the folder configuration > config > Metadata. When you edit one of these files, it typically opens in a visual editor in Studio. If a metadata file is too large, it may reduce the performance of the visual editor. You can configure Studio to open large files in the XML editor instead.

Procedure

  1. In Guidewire Studio, click File > Settings.
  2. In the Settings dialog, in the navigation list, expand Guidewire Studio, and then click Project Settings.
  3. In the File size limit for metadata editors box, set the maximum size (in kB) of a file that opens in the visual editor. Files larger than this size open in the XML editor.