| <?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="task" name="DC.Type" /> |
| <meta name="DC.Title" content="Using XML content assist" /> |
| <meta name="abstract" content="You can use content assist to help you finish a tag or line of code in the Source view of the XML editor. You can also use content assist to insert templates into your XML code." /> |
| <meta name="description" content="You can use content assist to help you finish a tag or line of code in the Source view of the XML editor. You can also use content assist to insert templates into your XML code." /> |
| <meta content="XML editor, editing, content assist, XML files" name="DC.subject" /> |
| <meta content="XML editor, editing, content assist, XML files" name="keywords" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/txedtsrc.html" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/twmacro.html" /> |
| <meta scheme="URI" name="DC.Relation" content="../topics/tsugstrat.html" /> |
| <meta content="XHTML" name="DC.Format" /> |
| <meta content="twcdast" 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>Using XML content assist</title> |
| </head> |
| <body id="twcdast"><a name="twcdast"><!-- --></a> |
| |
| |
| <h1 class="topictitle1">Using XML content assist</h1> |
| |
| |
| |
| |
| <div><p>You can use content assist to help you finish a tag or line of |
| code in the Source view of the XML editor. You can also use content assist |
| to insert templates into your XML code.</p> |
| |
| <div class="section"><p>The placement of the cursor in your source file provides the context |
| for the content assist to offer suggestions for completion.</p> |
| <p>You can |
| launch content assist in either of the following ways:</p> |
| <ul> |
| <li>From the <span class="uicontrol">Edit</span> menu, click <span class="uicontrol">Content Assist</span>, |
| or</li> |
| |
| <li>Press Ctrl+Space</li> |
| |
| </ul> |
| <p>In addition, you can set up an option that causes content assist to |
| pop up automatically when certain characters are typed. To set up this option, |
| click <span class="menucascade"><span class="uicontrol">Window</span> > <span class="uicontrol"> Preferences</span> |
| </span> to open the Preferences window, then click <span class="menucascade"><span class="uicontrol">Web |
| and XML</span> > <span class="uicontrol">XML Files </span> > <span class="uicontrol">XML Source</span> |
| </span> . In the <span class="uicontrol">Content assist</span> group box, select |
| the <span class="uicontrol">Automatically make suggestions</span> check box, and supply |
| any additional characters that should trigger content assist.</p> |
| <p>If your |
| cursor is in a position where content assist is available, a pop-up list of |
| available choices is displayed when you launch content assist. The list is |
| based on the context and whether a DTD or XML schema is associated with the |
| XML file being edited. For example, if you have an Address element that can |
| contain any of the following children elements: Name, Street, City, Zip Code, |
| Country, and Province, and you place your cursor after any of them and launch |
| content assist, all of the child elements will be listed in the content assist |
| list.</p> |
| <p>The content assist list displays all valid tags for the current |
| cursor position, including templates. If your grammar constraints are turned |
| off, all available tags, not just valid ones are displayed. </p> |
| <p> </p> |
| <p>As |
| you type the first one or two letters of the tag that you want, the list automatically |
| refreshes with alphabetized choices that match your input.</p> |
| <p><strong>Note</strong>: |
| The list only refreshes as described if you first type <kbd class="userinput"><</kbd> before |
| prompting for content assist.</p> |
| <p>Scroll down and select the tag that you |
| want to use by double-clicking on it. </p> |
| </div> |
| |
| </div> |
| |
| <div><div class="reltasks"><strong>Related tasks</strong><br /> |
| <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/twmacro.html" title="XML content assist provides a comment template, a chunk of predefined code that you can insert into a file. You may find a template useful when you have a certain piece of code you want to reuse several times, and you do not want to write it out every time.">Working with XML templates</a></div> |
| <div><a href="../topics/tsugstrat.html" title="You can customize the formatting of the suggestions given by content assist by choosing a suggestion strategy preference. When the suggestion strategy is set to "Strict", suggestions that are 'strictly' grammatically valid will be displayed first in the list of options and highlighted by bold icons. Other suggestions that are applicable to this element's scope but are not grammatically valid, will be displayed lower in the list with de-emphasized icons. When the suggestion strategy is set to "Lax", all suggestions will displayed in the list with de-emphasized icons.">Setting the XML source suggestion strategy used by content assist</a></div> |
| </div> |
| </div> |
| |
| </body> |
| </html> |