blob: a453b108c6703d22c2a953be8d0391b4a4452dca [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2005, v.4002-->
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="txedtsrc" xml:lang="en-us">
<title>Editing in the Source view</title>
<titlealts>
<searchtitle>Editing in the Source view</searchtitle>
</titlealts>
<shortdesc>You can use the Source view to view and work with a file's source
code directly.</shortdesc>
<prolog><metadata>
<keywords><indexterm>XML editor<indexterm>Source view</indexterm></indexterm>
</keywords>
</metadata></prolog>
<taskbody>
<context><p> The Source view has many text editing features, such as:</p><dl>
<dlentry>
<dt>Syntax highlighting</dt>
<dd>Each tag type is highlighted differently, enabling you to easily find
a certain kind of tag for editing. In addition, syntax highlighting is valuable
in locating syntax errors. For example, if you begin a comment in the middle
of the document with <codeph>&lt;!--</codeph> everything until the next <codeph>--></codeph> is
considered a comment, and will be highlighted accordingly. The large highlighted
area will indicate that you need to add <codeph>--></codeph> to close the
comment.<p>You can customize the syntax highlighting. Refer to the related
tasks for more information.</p></dd>
</dlentry></dl><dl><dlentry>
<dt>Unlimited undo and redo</dt>
<dd>These options allow you to incrementally undo and redo every change made
to a file for the entire editing session. For text, changes are incremented
one character or set of selected characters at a time.</dd>
</dlentry><dlentry>
<dt>Content assist</dt>
<dd>Content assist helps you finish tags and insert macros. Refer
to the related task for more details.</dd>
</dlentry><dlentry>
<dt>Template</dt>
<dd>You can access templates (using content assist) to help you quickly add
regularly-used tagging combinations. Refer to the related task for more details.</dd>
</dlentry><dlentry>
<dt>Node selection</dt>
<dd>Based on the location of your cursor (or selection in the Outline view),
the node selection indicator highlights the line numbers that include a node
(for example, an element or attribute), in the vertical ruler in the left
area of the Source view.</dd>
</dlentry><dlentry>
<dt>Pop-up menu options</dt>
<dd>From the editor's pop-up menu, you have many of the same editing options
available as you do from the workbench <b>Edit</b> menu. You can select menu
options such as: <uicontrol>Cleanup Document,</uicontrol> to open the <uicontrol>Cleanup</uicontrol>
dialog, which contains settings to update a document so that it is well-formed
and formatted and <uicontrol>Format,</uicontrol> which formats either the
entire document or selected elements.</dd>
</dlentry><dlentry>
<dt>"Smart" double clicking</dt>
<dd>You can use double-click to select attribute values, attribute-value pairs,
and entire tag sets to quickly update, copy, or remove content.</dd>
</dlentry></dl><p>To edit an XML file in the Source view, follow these steps:</p></context>
<steps>
<step><cmd>Open the XML file you want to work with in the XML editor (right-click
the file in the Navigator view and click <uicontrol>Open With > XML Editor</uicontrol>). </cmd>
<info>You might need to click the <uicontrol>Source</uicontrol> tab. Typically,
all that you will need to do to open the file is to double-click it in the
Navigator view. If this does not work, right-click it and click <uicontrol>Open
With > XML Editor</uicontrol>.</info></step>
<step><cmd>Edit the code as necessary, using any of the available features.</cmd>
<info>As you move the cursor within your XML file (or select items from the
Outline view), the node selection indicator will highlight the line numbers
that encompass the node (for example, an element or attribute). You can use
smart double-clicking behavior to select attribute values, attribute-value
pairs, and entire tag sets to quickly update, copy, or remove content.</info>
</step>
<step><cmd>At intervals, you might wish to format individual nodes, or the
entire XML file to restore element and attribute indentation to see nesting
hierarchies more clearly in the file.</cmd></step>
<step><cmd>If desired, validate and save the XML file.</cmd></step>
</steps>
<result><p>Any changes you make in the Source view are also reflected in the
Design view and the Outline view.</p></result>
</taskbody>
</task>
<?Pub *0000004423?>