syeshin | befd53e | 2005-07-27 18:16:40 +0000 | [diff] [blame] | 1 | <?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> |
syeshin | aaa2193 | 2005-09-22 17:13:22 +0000 | [diff] [blame^] | 6 | <!-- /******************************************************************************* |
| 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" /> |
syeshin | befd53e | 2005-07-27 18:16:40 +0000 | [diff] [blame] | 17 | <title>Creating an XML file from scratch</title> |
syeshin | 6607827 | 2005-09-20 16:53:38 +0000 | [diff] [blame] | 18 | </head> |
syeshin | befd53e | 2005-07-27 18:16:40 +0000 | [diff] [blame] | 19 | <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 |
| 23 | the XML editor.</p><div class="skipspace"><p>The following instructions were written for the Resource perspective, |
| 24 | but they will also work in many other perspectives.</p> |
| 25 | <p>To create an XML |
| 26 | file 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> > <span class="uicontrol">New</span> > <span class="uicontrol">Other</span> > <span class="uicontrol">XML</span> > <span class="uicontrol">XML</span></span>. </span> If you cannot see the <span class="uicontrol">XML</span> option, |
| 30 | select 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 |
| 33 | button.</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 |
| 37 | the XML file, for example <kbd class="userinput">MyXMLFile.xml</kbd>. The name of |
| 38 | your 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 |
| 42 | opens in the XML source page editor. The XML source page editor offers limited |
| 43 | functionality compared to the XML editor, so before editing the file, you |
| 44 | should close it, then right-click the file in the Navigator view and click <span class="uicontrol">Open |
| 45 | With > XML Editor</span> to open the file in the XML editor. </p> |
| 46 | <p>To |
| 47 | make the XML editor the default editor for XML files, select <span class="uicontrol">Window |
| 48 | > Preferences > Workbench > File Associations</span>, then select <span class="uicontrol">*.xml</span> and <span class="uicontrol">XML |
| 49 | Editor</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> |
syeshin | aaa2193 | 2005-09-22 17:13:22 +0000 | [diff] [blame^] | 61 | </div> |
syeshin | befd53e | 2005-07-27 18:16:40 +0000 | [diff] [blame] | 62 | </body> |
| 63 | </html> |