# Deleting elements, attributes, entities, notations, and comments

If you have created elements, attributes, entities, notations, and comments you no longer need, you can delete any of them.

The following instructions were written for the Resource perspective, but they will also work in many other perspectives.

To delete an element, attribute, entity, notation or comment:

1. Open your DTD in the DTD editor.
2. In the Outline view, click the element, attribute, entity, notation, or comment you want to delete. If you want to delete more than one item, hold down theCtrl key while you select items.
3. Right-click the item (or one of the items if you have selected more than one), and, from its pop-up menu, click Delete.

You can "undo" the deletion of an item. To do so, right-click any element, attribute, entity, notation, or comment and click Undo Delete. You must do this before you close the editor, otherwise, your items will no longer exist on the system and you will have to recreate them if you want them again.

The DTD editor has a built-in mechanism to handle referential integrity issues. When you delete or rename certain nodes, clean up will automatically occur.

> Referential integrity in the DTD editor
> The DTD editor has a built-in mechanism to handle referential integrity issues. When you delete or rename certain nodes, clean up for any nodes affected will automatically occur.

Parent topic: Editing DTDs

Related tasks
Creating attributes and attribute lists
Creating a comment
Creating entities
Creating notations

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