blob: a0d3a4ee4f341bc5116c0f8d8414d9303d21a2fa [file] [log] [blame]
kpriceef160682006-08-29 18:08:31 +00001<?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">
2<html lang="en-us" xml:lang="en-us">
syeshinbefd53e2005-07-27 18:16:40 +00003<head>
kpriceef160682006-08-29 18:08:31 +00004<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
kpriceb59c9f62008-04-02 21:24:37 +00005<meta name="copyright" content="Copyright (c) 2000, 2008 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" />
6<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
kpriceef160682006-08-29 18:08:31 +00007<meta content="public" name="security" />
8<meta content="index,follow" name="Robots" />
9<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))' />
10<meta content="concept" name="DC.Type" />
11<meta name="DC.Title" content="XML editor" />
12<meta name="abstract" content="The XML editor is a tool for creating and viewing XML files." />
13<meta name="description" content="The XML editor is a tool for creating and viewing XML files." />
14<meta content="XML editor, overview" name="DC.subject" />
15<meta content="XML editor, overview" name="keywords" />
16<meta scheme="URI" name="DC.Relation" content="../topics/tcretxml.html" />
17<meta scheme="URI" name="DC.Relation" content="../topics/tcrexdtd.html" />
18<meta scheme="URI" name="DC.Relation" content="../topics/tcrexxsd.html" />
19<meta scheme="URI" name="DC.Relation" content="../topics/txedttag.html" />
20<meta scheme="URI" name="DC.Relation" content="../topics/txedtdes.html" />
21<meta scheme="URI" name="DC.Relation" content="../topics/txedtsrc.html" />
22<meta scheme="URI" name="DC.Relation" content="../topics/cxmlcat.html" />
23<meta scheme="URI" name="DC.Relation" content="../topics/twxvalid.html" />
24<meta content="XHTML" name="DC.Format" />
25<meta content="cwxmledt" name="DC.Identifier" />
26<meta content="en-us" name="DC.Language" />
27<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
syeshinbefd53e2005-07-27 18:16:40 +000028<title>XML editor</title>
syeshin66078272005-09-20 16:53:38 +000029</head>
syeshinbefd53e2005-07-27 18:16:40 +000030<body id="cwxmledt"><a name="cwxmledt"><!-- --></a>
31
kpriceef160682006-08-29 18:08:31 +000032
syeshinbefd53e2005-07-27 18:16:40 +000033<h1 class="topictitle1">XML editor</h1>
kpriceef160682006-08-29 18:08:31 +000034
35
36
37
38<div><p>The XML editor is a tool for creating and viewing XML files.</p>
syeshind0bdb8e2005-10-27 17:44:14 +000039
40<p>You can use it to perform a variety of tasks such as:</p>
kpriceef160682006-08-29 18:08:31 +000041
42<ul>
43<li>Creating new, empty XML files or generating them from existing DTDs or
syeshind0bdb8e2005-10-27 17:44:14 +000044existing XML schemas</li>
kpriceef160682006-08-29 18:08:31 +000045
syeshind0bdb8e2005-10-27 17:44:14 +000046<li>Editing XML files</li>
kpriceef160682006-08-29 18:08:31 +000047
syeshind0bdb8e2005-10-27 17:44:14 +000048<li>Importing existing XML files for structured viewing</li>
kpriceef160682006-08-29 18:08:31 +000049
syeshind0bdb8e2005-10-27 17:44:14 +000050<li>Associating XML files with DTDs or XML schemas</li>
kpriceef160682006-08-29 18:08:31 +000051
syeshinbefd53e2005-07-27 18:16:40 +000052</ul>
kpriceef160682006-08-29 18:08:31 +000053
syeshind0bdb8e2005-10-27 17:44:14 +000054<p>The XML editor has two main views - the Source view and the Design view.
kpriceb59c9f62008-04-02 21:24:37 +000055You can also use the Outline view to insert and delete elements.</p>
kpriceef160682006-08-29 18:08:31 +000056
syeshind0bdb8e2005-10-27 17:44:14 +000057<div class="section"><h4 class="sectiontitle">Source view</h4><p>The Source view enables you to view
kpriceef160682006-08-29 18:08:31 +000058and work directly with a file's source code. Many of the XML editing features
59in the XML editor Source view are very similar to those available in the Source
60view of Page Designer.</p>
syeshind0bdb8e2005-10-27 17:44:14 +000061<div class="p">The Source view has many text editing features,
kpriceef160682006-08-29 18:08:31 +000062such as: <ul>
63<li> Syntax highlighting, unlimited undo/redo, and user-defined templates.</li>
64
syeshind0bdb8e2005-10-27 17:44:14 +000065<li> Content assist, which uses the information in a DTD or schema content
66model to provide a list of acceptable continuations depending on where the
kpriceb59c9f62008-04-02 21:24:37 +000067cursor is located in an XML file, or what has just been typed.</li>
kpriceef160682006-08-29 18:08:31 +000068
syeshind0bdb8e2005-10-27 17:44:14 +000069<li>"Smart" double-clicking behavior. If your cursor is placed in an attribute
70value, one double-click selects that value, another double click selects the
71attribute-value pair, and a third double-click selects the entire tag. This
72makes it easier to copy and paste commonly used pieces of XML.</li>
kpriceef160682006-08-29 18:08:31 +000073
syeshind0bdb8e2005-10-27 17:44:14 +000074</ul>
syeshinbefd53e2005-07-27 18:16:40 +000075</div>
syeshind0bdb8e2005-10-27 17:44:14 +000076</div>
kpriceef160682006-08-29 18:08:31 +000077
syeshind0bdb8e2005-10-27 17:44:14 +000078<div class="section"><h4 class="sectiontitle">Design view</h4><div class="p">The XML editor also has a Design view.
kpriceb59c9f62008-04-02 21:24:37 +000079This view has the following features:<ul>
kpriceef160682006-08-29 18:08:31 +000080<li>The XML file is represented simultaneously as a table and a tree. This
syeshind0bdb8e2005-10-27 17:44:14 +000081helps make navigation and editing easier.</li>
kpriceef160682006-08-29 18:08:31 +000082
syeshind0bdb8e2005-10-27 17:44:14 +000083<li>Content and attribute values can be edited directly in the table cells,
84while pop-up menus on the tree nodes give alternatives that are valid for
kpriceb59c9f62008-04-02 21:24:37 +000085that location. For example, the <span class="uicontrol">Add Child</span> menu item
syeshind0bdb8e2005-10-27 17:44:14 +000086will list only those elements from a DTD or XML schema which would be valid
87children at that point (as long as grammar constraints are on).</li>
kpriceef160682006-08-29 18:08:31 +000088
syeshind0bdb8e2005-10-27 17:44:14 +000089</ul>
90</div>
kpriceef160682006-08-29 18:08:31 +000091<p>The Design view is especially helpful if you are new to XML, or
92need to do form-oriented editing. For example, you could use the Create XML
93File wizard to create a template XML file for a job description form from
kpriceb59c9f62008-04-02 21:24:37 +000094a job description DTD. After those steps are completed, you would only have
95to fill in the form data using the Design view.</p>
96<p />
syeshinbefd53e2005-07-27 18:16:40 +000097</div>
kpriceef160682006-08-29 18:08:31 +000098
syeshinbefd53e2005-07-27 18:16:40 +000099</div>
kpriceef160682006-08-29 18:08:31 +0000100
syeshind0bdb8e2005-10-27 17:44:14 +0000101<div><div class="relconcepts"><strong>Related concepts</strong><br />
102<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>
syeshinaaa21932005-09-22 17:13:22 +0000103</div>
syeshind0bdb8e2005-10-27 17:44:14 +0000104<div class="reltasks"><strong>Related tasks</strong><br />
kprice0d617d02007-04-05 04:02:49 +0000105<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>
syeshind0bdb8e2005-10-27 17:44:14 +0000106<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>
107<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>
108<div><a href="../topics/txedttag.html" title="This file contains information about editing XML files.">Editing XML files</a></div>
109<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>
110<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>
111<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>
112</div>
kpriceef160682006-08-29 18:08:31 +0000113</div>
114
115</body>
syeshinbefd53e2005-07-27 18:16:40 +0000116</html>