Editing XML files

To open an XML file in the XML editor, right-click it in the Navigator view and click Open With > XML Editor. To make the XML editor the default editor for XML files, select Window > Preferences > Workbench > File Associations, then select *.xml and XML Editor from the Associated Editors list. Click OK.

We recommend working in the Resource perspective when you are developing XML files.  The views that appear by default in this perspective (such as the Outline view) help facilitate XML development.

The XML editor enables you to directly edit XML files.  There are several different views you can use to edit your files:

Often, you may find that you have more than one way to perform a specific task. For example, you have an XML file "MySchoolSubjects.xml" associated with an XML schema file "SchoolSubjects.xsd" which list all the subjects taught in a school. You want to insert a new element "Math" into your file. You can do so the following ways:

(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.