Moving and Removing Elements

There are two ways to move elements and restructure your document. On platforms which support Drag & Drop, you can drag an element from the tree and drop it into a place where the element is valid according to the DTD. You can drop it within the same document or on another document of the same type. Lines and rectangles are drawn on the tree as you're dragging over it to show where the element would be dropped if you release the mouse. You can also drag items into the library as dicussed in Chapter 4 If the drop location does not allow the item being dragged to be inserted at that point, an error message will appear for a few seconds in the status bar at the bottom of the document window.

The second and probably more reliable method for moving elements is to use Copy or Cut, and Paste. Use the copy and paste menu items available when you right-click on an element. These actions don't work from the menus for elements in the tree view with Xerlin 1.2. You can paste items into, after, or before another node. This works the same as the Add, Add->Before, and Add->After actions. Only valid pastes according to the DTD will be allowed as shown in Figure 3.8

Figure 3.8. Pasting Nodes

To remove elements, simply right-click on what you want to removed, and choose Delete. This removes the highlighted element and its sub-elements. If you accidentally delete something you didn't want to, Xerlin supports up to 10 levels of Undo. Undo also works for Cut, Paste, and Adding of elements.