Editing XML


If you open an XML file in the Workbench the default editor will typically be a text editor.

However, if you want to edit or otherwise modify the page you may wish to use the XML editor. To do this you should right-click on the file in a view such as the Package Explorer, and choose the Open With menu. One of the options will be Amateras XML Editor, and you should choose this. This works similarly to the way that you can open an HTML file with an HTML editor.

The Amateras XML editor is based on the Amateras HTML plugin, an open source plugin that provides many useful features for working with web content. When the file is open it appears something like the following.

Open XML

The editor provides a number of useful features including the following.

Syntax Error Reporting

If the editor finds problems in your JSP, such as unfinished or missing tags or attributes, these are reported as errors and warnings.

Command Completion

At any stage you can type CTRL+space and you will get options for completing the command. For example, you may get suggestions for closing tags.

Structure Hierarchy

You can get a view for the hierarchy of the structure of the document from the open/closers in the left-hand margin. Move the mouse over the margin, and a bar will appear that shows the extent of the tag.

XML Outline

A special Outline view is given for the XML; this gives you an overview of the structure of the page. It also allows you to navigate to the different elements.