blob: 0515a1de8c36782ecbd1131af14ee9d20a05e4b4 [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="concept" name="DC.Type" />
<meta name="DC.Title" content="XML editor" />
<meta name="abstract" content="The XML editor is a tool for creating and viewing XML files." />
<meta name="description" content="The XML editor is a tool for creating and viewing XML files." />
<meta content="XML editor, overview" name="DC.subject" />
<meta content="XML editor, overview" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/tcretxml.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/tcrexdtd.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/tcrexxsd.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/txedttag.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/txedtdes.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/txedtsrc.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/cxmlcat.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/twxvalid.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="cwxmledt" 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>XML editor</title>
</head>
<body id="cwxmledt"><a name="cwxmledt"><!-- --></a>
<h1 class="topictitle1">XML editor</h1>
<div><p>The XML editor is a tool for creating and viewing XML files.</p>
<p>You can use it to perform a variety of tasks such as:</p>
<ul>
<li>Creating new, empty XML files or generating them from existing DTDs or
existing XML schemas</li>
<li>Editing XML files</li>
<li>Importing existing XML files for structured viewing</li>
<li>Associating XML files with DTDs or XML schemas</li>
</ul>
<p>The XML editor has two main views - the Source view and the Design view.
You can also use the <strong>Outline</strong> view to insert and delete elements.</p>
<div class="section"><h4 class="sectiontitle">Source view</h4><p>The Source view enables you to view
and work directly with a file's source code. Many of the XML editing features
in the XML editor Source view are very similar to those available in the Source
view of Page Designer.</p>
<div class="p">The Source view has many text editing features,
such as: <ul>
<li> Syntax highlighting, unlimited undo/redo, and user-defined templates.</li>
<li> Content assist, which uses the information in a DTD or schema content
model to provide a list of acceptable continuations depending on where the
cursor is located in an XML file, or what has just been type</li>
<li>"Smart" double-clicking behavior. If your cursor is placed in an attribute
value, one double-click selects that value, another double click selects the
attribute-value pair, and a third double-click selects the entire tag. This
makes it easier to copy and paste commonly used pieces of XML.</li>
</ul>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Design view</h4><div class="p">The XML editor also has a Design view.
In it: <ul>
<li>The XML file is represented simultaneously as a table and a tree. This
helps make navigation and editing easier.</li>
<li>Content and attribute values can be edited directly in the table cells,
while pop-up menus on the tree nodes give alternatives that are valid for
that location. For example, the <span class="uicontrol">Add child</span> menu item
will list only those elements from a DTD or XML schema which would be valid
children at that point (as long as grammar constraints are on).</li>
</ul>
</div>
<p>The Design view is especially helpful if you are new to XML, or
need to do form-oriented editing. For example, you could use the Create XML
File wizard to create a template XML file for a job description form from
a job description DTD. After those steps are completed, you would
only have to fill in the form data using the Design view.</p>
<p>The following
links provide more information about the XML editor:</p>
</div>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../topics/cxmlcat.html" title="When an XML file is associated with a DTD or XML schema, it is bound by any structural rules contained in the DTD or XML schema. To be considered a valid XML file, a document must be accompanied by a DTD or an XML schema, and conform to all of the declarations in the DTD or the XML schema.">XML file associations with DTDs and XML schemas</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="../topics/tcretxml.html" title="You can create a new XML file which you can then edit in the XML editor. You create a new XML file that is not associated with a DTD or XML schema file, so there are no restrictions on the kind of content it can contain.">Creating XML files</a></div>
<div><a href="../topics/tcrexdtd.html" title="You can generate an XML file from your DTD if you want to quickly create an XML file based on your DTD file. Generating an XML file from your DTD saves you time by creating an XML file that is already associated with your DTD, and contains at least some of the elements and attributes in your DTD.">Generating XML files from DTDs</a></div>
<div><a href="../topics/tcrexxsd.html" title="You can generate an XML file from your XML schema if you want to quickly create an XML file based on your XML schema file. Generating an XML file from your XML schema saves you time by creating an XML file that is already associated with your XML schema, and contains at least some of the elements and attributes in your XML schema.">Generating XML files from XML schemas</a></div>
<div><a href="../topics/txedttag.html" title="This file contains information about editing XML files.">Editing XML files</a></div>
<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><a href="../topics/twxvalid.html" title="When you validate your XML file, the XML validator will check to see that your file is valid and well-formed.">Validating XML files</a></div>
</div>
</div>
</body>
</html>