kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 2 | <!--Arbortext, Inc., 1988-2006, v.4002-->
|
| 3 | <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
|
| 4 | "task.dtd">
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 5 | <task id="txedttag" xml:lang="en-us">
|
| 6 | <title>Editing XML files</title>
|
| 7 | <titlealts>
|
| 8 | <searchtitle>Editing XML files</searchtitle>
|
| 9 | </titlealts>
|
| 10 | <shortdesc>This file contains information about editing XML files.</shortdesc>
|
| 11 | <prolog><metadata>
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 12 | <keywords><indexterm>XML editor<indexterm>XML files</indexterm></indexterm>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 13 | <indexterm>XML files<indexterm>editing</indexterm></indexterm></keywords>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 14 | </metadata></prolog>
|
| 15 | <taskbody>
|
| 16 | <context><p>To open an XML file in the XML editor, right-click it in the Navigator
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 17 | view and select <menucascade><uicontrol>Open With</uicontrol><uicontrol>XML
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 18 | Editor</uicontrol></menucascade>. </p><p>We recommend working in the Resource
|
| 19 | perspective when you are developing XML files. The views that appear by default
|
| 20 | in this perspective (such as the Outline view) help facilitate XML development.</p><p>The
|
| 21 | XML editor enables you to directly edit XML files. There are several different
|
| 22 | views you can use to edit your files:</p><ul>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 23 | <li><b>Source view</b>: you can manually insert, edit, and delete elements
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 24 | and attributes in the Source view of the XML editor. To facilitate this effort,
|
| 25 | you can use content assist while you are in the Source view.</li>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 26 | <li><b>Design view</b>: you can insert, delete, and edit elements, attributes,
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 27 | comments, and processing instructions in this view.</li>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 28 | <li><b>Outline view</b>: you can insert and delete elements attributes, comments,
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 29 | and processing instructions in this view.</li>
|
| 30 | </ul><p>Often, you may find that you have more than one way to perform a specific
|
| 31 | task. For example, you have an XML file "MySchoolSubjects.xml" associated
|
| 32 | with an XML schema file "SchoolSubjects.xsd", which list all the subjects
|
| 33 | taught in a school. You want to insert a new element "Math" into your file.
|
| 34 | You can do so in the following ways:</p><ul>
|
| 35 | <li>In the Outline or Design view, right-click the appropriate parent element
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 36 | and select <menucascade><uicontrol>Add Child</uicontrol><uicontrol>Math</uicontrol>
|
| 37 | </menucascade> or <uicontrol>New Element</uicontrol> and enter the name of
|
| 38 | the child element<?Pub Caret?>.</li>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 39 | <li>In the Source view, use content assist to help you find the appropriate
|
| 40 | location and code for the <uicontrol>Math</uicontrol> element.</li>
|
| 41 | <li>In the Source view, type the code for the <uicontrol>Math</uicontrol> element
|
| 42 | in the file.</li>
|
| 43 | </ul></context>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 44 | <postreq></postreq>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 45 | </taskbody>
|
| 46 | </task>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 47 | <?Pub *0000002530?>
|