blob: 4a65ff08855ad48d5cef5f149ac3d7b000b045cc [file] [log] [blame]
kpriceef160682006-08-29 18:08:31 +00001<?xml version="1.0" encoding="utf-8"?>
kpriceb59c9f62008-04-02 21:24:37 +00002<!--Arbortext, Inc., 1988-2006, v.4002-->
4 "task.dtd">
kpriceef160682006-08-29 18:08:31 +00005<task id="txedttag" xml:lang="en-us">
6<title>Editing XML files</title>
8<searchtitle>Editing XML files</searchtitle>
10<shortdesc>This file contains information about editing XML files.</shortdesc>
kprice9623e9d2007-05-03 03:43:05 +000012<keywords><indexterm>XML editor<indexterm>XML files</indexterm></indexterm>
kpriceb59c9f62008-04-02 21:24:37 +000013<indexterm>XML files<indexterm>editing</indexterm></indexterm></keywords>
kpriceef160682006-08-29 18:08:31 +000014</metadata></prolog>
16<context><p>To open an XML file in the XML editor, right-click it in the Navigator
kpriceb59c9f62008-04-02 21:24:37 +000017view and select <menucascade><uicontrol>Open With</uicontrol><uicontrol>XML
kpriceef160682006-08-29 18:08:31 +000018Editor</uicontrol></menucascade>. </p><p>We recommend working in the Resource
19perspective when you are developing XML files. The views that appear by default
20in this perspective (such as the Outline view) help facilitate XML development.</p><p>The
21XML editor enables you to directly edit XML files. There are several different
22views you can use to edit your files:</p><ul>
kpriceb59c9f62008-04-02 21:24:37 +000023<li><b>Source view</b>: you can manually insert, edit, and delete elements
kpriceef160682006-08-29 18:08:31 +000024and attributes in the Source view of the XML editor. To facilitate this effort,
25you can use content assist while you are in the Source view.</li>
kpriceb59c9f62008-04-02 21:24:37 +000026<li><b>Design view</b>: you can insert, delete, and edit elements, attributes,
kpriceef160682006-08-29 18:08:31 +000027comments, and processing instructions in this view.</li>
kpriceb59c9f62008-04-02 21:24:37 +000028<li><b>Outline view</b>: you can insert and delete elements attributes, comments,
kpriceef160682006-08-29 18:08:31 +000029and processing instructions in this view.</li>
30</ul><p>Often, you may find that you have more than one way to perform a specific
31task. For example, you have an XML file "MySchoolSubjects.xml" associated
32with an XML schema file "SchoolSubjects.xsd", which list all the subjects
33taught in a school. You want to insert a new element "Math" into your file.
34You can do so in the following ways:</p><ul>
35<li>In the Outline or Design view, right-click the appropriate parent element
kpriceb59c9f62008-04-02 21:24:37 +000036and select <menucascade><uicontrol>Add Child</uicontrol><uicontrol>Math</uicontrol>
37</menucascade> or <uicontrol>New Element</uicontrol> and enter the name of
38the child element<?Pub Caret?>.</li>
kpriceef160682006-08-29 18:08:31 +000039<li>In the Source view, use content assist to help you find the appropriate
40location and code for the <uicontrol>Math</uicontrol> element.</li>
41<li>In the Source view, type the code for the <uicontrol>Math</uicontrol> element
42in the file.</li>
kpriceb59c9f62008-04-02 21:24:37 +000044<postreq></postreq>
kpriceef160682006-08-29 18:08:31 +000045</taskbody>
kpriceb59c9f62008-04-02 21:24:37 +000047<?Pub *0000002530?>