XML Refactoring actions

  • context menu of current editor+XML Refactoring+Surround with tag... (Ctrl+Alt+E): Selected Text in the editor is marked with the specified start and end tags.

  • context menu of current editor+XML Refactoring+Surround with <tag> (Ctrl+Alt+/): Selected Text in the editor is marked with start and end tags of the last 'Surround in' action.

  • context menu of current editor+XML Refactoring+Rename element (Ctrl+Alt+R): The element from the caret position and the elements that have the same name as the current element can be renamed according with the options from the Rename dialog.

  • context menu of current editor+XML Refactoring+Rename prefix : The prefix of the element from the caret position and the elements that have the same prefix as the current element can be renamed according with the options from the Rename dialog.

    Figure 4.40. Rename Prefix Dialog

    Rename Prefix Dialog

    Selecting the Rename current element prefix option the application will recursively traverse the current element and all its children.

    For example, to change the xmlns:p1="ns1" association existing in the current element to xmlns:p5="ns1" just select this option and press OK. If the association xmlns:p1="ns1" is applied on the parent of the current element, then <oXygen/> will introduce a new declaration xmlns:p5="ns1" in the current element and will change the prefix from p1 to p5. If p5 is already associated in the current element with another namespace, let's say ns5, then a dialog showing the conflict will be displayed. Pressing the OK button, the prefix will be modified from p1 to p5 without inserting a new declaration xmlns:p5="ns1". On Cancel no modification is made.

    Selecting the "Rename current prefix in all document" option the application will apply the change on the entire document.

    To apply the action also inside attribute values one must check the Rename also attribute values that start with the same prefix checkbox.

  • context menu of current editor+XML Refactoring+Split element : Split the element from the caret position in two identical elements. The caret must be inside the element

  • context menu of current editor+XML Refactoring+Join elements : Joins the left and the right elements relative to the current caret position. The elements must have the same name, attributes and attributes values.

  • context menu of current editor+XML Refactoring+Delete element tags (Ctrl+Alt+X): Deletes the start tag and end tag of the current element.