blob: af6b692b8578bc3a0c1223d4238a82dbbf3764e9 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2006" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="task" name="DC.Type" />
<meta name="DC.Title" content="Editing XML files" />
<meta name="abstract" content="This file contains information about editing XML files." />
<meta name="description" content="This file contains information about editing XML files." />
<meta content="XML files, editing, XML editor" name="DC.subject" />
<meta content="XML files, editing, XML editor" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/cwxmledt.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/txedtdes.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/txedtsrc.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="txedttag" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Editing XML files</title>
</head>
<body id="txedttag"><a name="txedttag"><!-- --></a>
<h1 class="topictitle1">Editing XML files</h1>
<div><p>This file contains information about editing XML files.</p>
<div class="section"><p>To open an XML file in the XML editor, right-click it in the Navigator
view and click <span class="menucascade"><span class="uicontrol">Open With</span> &gt; <span class="uicontrol">XML
Editor</span></span>. </p>
<p>We recommend working in the Resource
perspective when you are developing XML files. The views that appear by default
in this perspective (such as the Outline view) help facilitate XML development.</p>
<p>The
XML editor enables you to directly edit XML files. There are several different
views you can use to edit your files:</p>
<ul>
<li><strong>Source view</strong> - you can manually insert, edit, and delete elements
and attributes in the Source view of the XML editor. To facilitate this effort,
you can use content assist while you are in the Source view.</li>
<li><strong>Design view</strong> - you can insert, delete, and edit elements, attributes,
comments, and processing instructions in this view.</li>
<li><strong>Outline view </strong>- you can insert and delete elements attributes, comments,
and processing instructions in this view.</li>
</ul>
<p>Often, you may find that you have more than one way to perform a specific
task. For example, you have an XML file "MySchoolSubjects.xml" associated
with an XML schema file "SchoolSubjects.xsd", which list all the subjects
taught in a school. You want to insert a new element "Math" into your file.
You can do so in the following ways:</p>
<ul>
<li>In the Outline or Design view, right-click the appropriate parent element
and select <span class="uicontrol">Math</span> from the <span class="uicontrol">Add Child</span> pop-up
menu.</li>
<li>In the Source view, use content assist to help you find the appropriate
location and code for the <span class="uicontrol">Math</span> element.</li>
<li>In the Source view, type the code for the <span class="uicontrol">Math</span> element
in the file.</li>
</ul>
</div>
<div class="section">The following links provide more information about the XML editor
and editing XML files:</div>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../topics/cwxmledt.html" title="The XML editor is a tool for creating and viewing XML files.">XML editor</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="../topics/txedtdes.html" title="The XML editor has a Design view, which represents the XML file simultaneously as a table and a tree. This helps make navigation and editing easier. Content and attribute values can be edited directly in the table cells, while pop-up menus on the tree elements give alternatives that are valid for that particular element.">Editing in the Design view</a></div>
<div><a href="../topics/txedtsrc.html" title="You can use the Source view to view and work with a file's source code directly.">Editing in the Source view</a></div>
</div>
</div>
</body>
</html>