Home > Online Product Documentation > Table of Contents > Updating XML Documents Using the Text Editor
You use the Text tab of the XML editor to edit XML text. The Text tab provides the usual tools you expect to find in a text editor.
Select the text you want to edit and then do any of the following:
You can select a portion of text and move it to a new location by dragging it. You can drag text from one document to another. You can drag text from documents outside Stylus Studio to a document in Stylus Studio.
Following are some of Stylus Studio's main editing features.
Sense:X prompts you with the possible tags that you can insert at a given location. The Sense:X feature is available if the document is associated with a schema. As soon as you type a tag open bracket, Stylus Studio displays a scrollable list of the elements that are allowed at that location. Double-click the tag you want. For example, suppose you have a schema where the book element can contain
author or
title elements. If you add a
book element, the Sense:X list displays only the
author and
title tags.
Indent XML tags to show the hierarchy relationships. Click
Indent XML Tags
. Stylus Studio indents all text in the active XML document window.
Stylus Studio automatically wraps lines whose length exceeds 16k characters. You can also turn on line wrap manually, by selecting Edit > Wrap Lines from the Stylus Studio menu. When this feature is on, Stylus Studio wraps lines to fit in the available window; the place at which the line wraps moves as the width of the window changes. Green arrows, as shown in Figure 114, indentify lines that have wrapped.
You can change the font of the text display in Stylus Studio. This change affects only the Stylus Studio display. Beyond personal preference, you might choose to change the font for localization purposes - the available fonts are the fonts that can display the characters in your XML file. For example, in a Japanese file, only two or three font names appear. Click
Font Change
to display a list of fonts.
Enclose selected text in comment tags. Select the text that you want to be a comment. In the Stylus Studio tool bar, click
Comment/Uncomment Selection
. To remove comment tags, select the comment element and its contents, and click
Comment/Uncomment Selection.
You can set bookmarks in the XML display. Bookmarks allow you to jump to important lines in your file. See Using Bookmarks.
Search for and replace text you specify. Click
Find
or
Replace
in the tool bar. You can also enable Find by pressing Ctrl + F.
When you enable Find, Stylus Studio displays the word in which the cursor is located - whether the cursor is within the word or immediately adjacent to it - in the Find what field of the Find dialog box. Similarly, any text you have selected - whole, partial, or multiple words - is displayed in the Find what field.
|
Tip
|
|
You can scroll through a list of the other words you have searched for by pressing the down arrow when the Find what field is active. |
Stylus Studio uses colors to distinguish the types of data in an XML document. The default colors are described in the Table 11. To change them, select Tools > Options, and under Application Settings click Editor Format.