blob: c87997c029fee0cf5e9f32269e11ccef9b8aaf4b [file] [log] [blame]
syeshinbefd53e2005-07-27 18:16:40 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4<html>
5<head>
syeshinaaa21932005-09-22 17:13:22 +00006<!-- /*******************************************************************************
7 * Copyright (c) 2000, 2005 IBM Corporation and others.
8 * All rights reserved. This program and the accompanying materials
9 * are made available under the terms of the Eclipse Public License v1.0
10 * which accompanies this distribution, and is available at
11 * http://www.eclipse.org/legal/epl-v10.html
12 *
13 * Contributors:
14 * IBM Corporation - initial API and implementation
15 *******************************************************************************/ -->
16<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
syeshinbefd53e2005-07-27 18:16:40 +000017<title>Creating an XML file from scratch</title>
syeshin66078272005-09-20 16:53:38 +000018</head>
syeshinbefd53e2005-07-27 18:16:40 +000019<body id="tcretxml"><a name="tcretxml"><!-- --></a>
20
21<h1 class="topictitle1">Creating an XML file from scratch</h1>
22<div><p>You can create a new empty XML file, which you can then edit in
23the XML editor.</p><div class="skipspace"><p>The following instructions were written for the Resource perspective,
24but they will also work in many other perspectives.</p>
25<p>To create an XML
26file from scratch, follow these instructions:</p>
27</div>
28<ol><li class="skipspace"><span>If necessary, create a project to contain the XML file. </span></li>
29<li class="skipspace"><span>In the workbench, click <span class="menucascade"><span class="uicontrol">File</span> &gt; <span class="uicontrol">New</span> &gt; <span class="uicontrol">Other</span> &gt; <span class="uicontrol">XML</span> &gt; <span class="uicontrol">XML</span></span>. </span> If you cannot see the <span class="uicontrol">XML</span> option,
30select the <span class="uicontrol">Show All Wizards</span> check box.</li>
31<li class="skipspace"><span>Click <span class="uicontrol">Next</span></span></li>
32<li class="skipspace"><span>Click the <span class="uicontrol">Create XML file from scratch</span> radio
33button.</span></li>
34<li class="skipspace"><span>Click <span class="uicontrol">Next.</span></span></li>
35<li class="skipspace"><span>Select the project or folder that will contain the XML file.</span></li>
36<li class="skipspace"><span>In the <span class="uicontrol">File name</span> field, type the name of
37the XML file, for example <kbd class="userinput">MyXMLFile.xml</kbd>. The name of
38your XML file <var class="varname">must</var> end in <kbd class="userinput">.xml</kbd>.</span></li>
39<li class="skipspace"><span>Click <span class="uicontrol">Finish</span>.</span></li>
40</ol>
41<div class="skipspace"><p>The XML file appears in the Navigator view and, by default, automatically
42opens in the XML source page editor. The XML source page editor offers limited
43functionality compared to the XML editor, so before editing the file, you
44should close it, then right-click the file in the Navigator view and click <span class="uicontrol">Open
45With &gt; XML Editor</span> to open the file in the XML editor. </p>
46<p>To
47make the XML editor the default editor for XML files, select <span class="uicontrol">Window
48&gt; Preferences &gt; Workbench &gt; File Associations</span>, then select <span class="uicontrol">*.xml</span> and <span class="uicontrol">XML
49Editor</span> from the Associated Editors list. Click <span class="uicontrol">OK</span>. </p>
50</div>
51</div>
52
53<div><p><b class="relconceptshd">Related concepts</b><br />
54<a href="../topics/cwxmledt.html" title="The XML editor is a tool for creating and viewing XML files">XML editor</a><br />
55</p>
56<p><b class="reltaskshd">Related tasks</b><br />
57<a href="../topics/tcrexdtd.html" title="">Generating an XML file from a DTD </a><br />
58<a href="../topics/tcrexxsd.html" title="">Generating an XML file from an XML schema</a><br />
59<a href="../topics/txedttag.html" title="">Editing XML files</a><br />
60</p>
syeshinaaa21932005-09-22 17:13:22 +000061</div>
syeshinbefd53e2005-07-27 18:16:40 +000062</body>
63</html>