The XML editor has a Design view, which represents the XML file simultaneously as a table and a tree. This helps make navigation and editing easier. Content and attribute values can be edited directly in the table cells, while pop-up menus on the tree elements give alternatives that are valid for that particular element.
For example, the Add child menu item will list only those elements from a DTD or XML schema which would be valid children at that point.
When you have an XML file associated with an XML schema or DTD file, certain tags and rules for that file have already been established, which is why the Design view can provide prompts (via a pop-up menu) for those tags. When you create an XML file that is not associated with an XML schema or DTD file, it has no tags or rules associated with it, so the Design view cannot provide prompts for specific tags, but it can provide prompts to create new elements and attributes.
For any XML file associated with an XML schema or DTD file, you can use the Design view to add any items defined in the XML schema or DTD (such as elements and attributes) to the XML file. You can also use it to add processing instructions and comments to all XML files.
For more information on the icons used in the Design view, refer to the related reference.
The following instructions were written for the Resource perspective, but they will also work in many other perspectives.
To edit an XML file in the Design view, follow these steps:
Any changes you make in the Design view are also reflected in the Source view and the Outline view.
Editing your DOCTYPE declaration
The DOCTYPE declaration in an XML file is used at the beginning of it to associate it with a DTD file. You can edit your DOCTYPE declaration to change the DTD file your XML file is associated with.Editing your namespace information
Your namespace information is used to provide various information about the XML file, such as the XML schema it is associated with.Editing your XML processing instructions
A processing instruction is a syntax in XML for passing instructions along to the application using an XML document.
Related concepts
XML editor
XML file associations with DTDs and XML schemas
Related tasks
Editing in the Source view
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.