| <?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> |
| <head> |
| <link rel="stylesheet" type="text/css" href="../../com.ibm.help.doc/swg_info_common.css" /> |
| <title>Creating an XML file from scratch</title> |
| <script language="JavaScript"> |
| function popup_window( url, id, width, height ) |
| { |
| popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + ',left=,top=' ); |
| popup.focus(); |
| } |
| </script><script language="JavaScript" src="help/liveHelp.js"></script></head> |
| <body id="tcretxml"><a name="tcretxml"><!-- --></a> |
| |
| <h1 class="topictitle1">Creating an XML file from scratch</h1> |
| <div><p>You can create a new empty XML file, which you can then edit in |
| the XML editor.</p><div class="skipspace"><p>The following instructions were written for the Resource perspective, |
| but they will also work in many other perspectives.</p> |
| <p>To create an XML |
| file from scratch, follow these instructions:</p> |
| </div> |
| <ol><li class="skipspace"><span>If necessary, create a project to contain the XML file. </span></li> |
| <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, |
| select the <span class="uicontrol">Show All Wizards</span> check box.</li> |
| <li class="skipspace"><span>Click <span class="uicontrol">Next</span>. </span></li> |
| <li class="skipspace"><span>Click the <span class="uicontrol">Create XML file from scratch</span> radio |
| button.</span></li> |
| <li class="skipspace"><span>Click <span class="uicontrol">Next.</span></span></li> |
| <li class="skipspace"><span>Select the project or folder that will contain the XML file.</span></li> |
| <li class="skipspace"><span>In the <span class="uicontrol">File name</span> field, type the name of |
| the XML file, for example <kbd class="userinput">MyXMLFile.xml</kbd>. The name of |
| your XML file <var class="varname">must</var> end in <kbd class="userinput">.xml</kbd>.</span></li> |
| <li class="skipspace"><span>Click <span class="uicontrol">Finish</span>.</span></li> |
| </ol> |
| <div class="skipspace"><p>The XML file appears in the Navigator view and, by default, automatically |
| opens in the XML source page editor. The XML source page editor offers limited |
| functionality compared to the XML editor, so before editing the file, you |
| should close it, then right-click the file in the Navigator view and click <span class="uicontrol">Open |
| With > XML Editor</span> to open the file in the XML editor. </p> |
| <p>To |
| make the XML editor the default editor for XML files, select <span class="uicontrol">Window |
| > Preferences > Workbench > File Associations</span>, then select <span class="uicontrol">*.xml</span> and <span class="uicontrol">XML |
| Editor</span> from the Associated Editors list. Click <span class="uicontrol">OK</span>. </p> |
| </div> |
| </div> |
| |
| <div><p><b class="relconceptshd">Related concepts</b><br /> |
| <a href="../topics/cwxmledt.html" title="The XML editor is a tool for creating and viewing XML files">XML editor</a><br /> |
| </p> |
| <p><b class="reltaskshd">Related tasks</b><br /> |
| <a href="../topics/tcrexdtd.html" title="">Generating an XML file from a DTD </a><br /> |
| <a href="../topics/tcrexxsd.html" title="">Generating an XML file from an XML schema</a><br /> |
| <a href="../topics/txedttag.html" title="">Editing XML files</a><br /> |
| </p> |
| </div><p> |
| (C) Copyright IBM Corporation 2000, 2005. All Rights Reserved. |
| </p> |
| </body> |
| </html> |