Folding of the XML Elements

An XML document is organized as a tree of elements. When working on a large document you can collapse some elements, leaving only the ones you need to edit in the focus. Expanding and collapsing works on individual elements. Expanding an element leaves the child elements unchanged.

Figure: Folding of the XML Elements

The fact that the folds are persistent is a unique feature of Oxygen XML Editor. The next time you open the document the folds are restored to its last state.

To toggle the folded state of an element, click the special mark displayed in the left part of the document editor next to the start tag of that element or use the Toggle fold action that is available from the Document > Folding menu (in Author mode it is also available from the Folding submenu of the contextual menu). The element extent is marked with a gray line displayed in the left part of the edited document. The gray line always cover the lines of text between the start tag and end tag of the element where the cursor is positioned.

The following other menu actions related to folding of XML elements are available from the Document > Folding menu or the contextual menu of the folding stripe (in Author mode they are also available from the Folding submenu of the contextual menu):

Collapse Other Folds (Ctrl NumPad / (Meta NumPad / on OS X))
Folds all the elements except the current element.
Collapse Child Folds (Ctrl NumPad . (Meta NumPad . on OS X))
Folds the elements indented with one level inside the current element.
Expand Child Folds
Unfolds all child elements of the currently selected element.
Expand All (Ctrl NumPad * (Meta NumPad * on OS X))
Unfolds all elements in the current document.

To watch our video demonstration about the folding support in Oxygen XML Editor, go to http://oxygenxml.com/demo/FoldingSupport.html.