blob: b7f8d126340f9dd3b39550e06706477dae6d3412 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 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
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>Validating XML files</title>
<body id="twxvalid"><a name="twxvalid"><!-- --></a>
<h1 class="topictitle1">Validating XML files</h1>
<div><p>When you validate your XML file, the XML validator will check to
see that your file is valid and well-formed.</p>
<div><div class="skipspace"><p>The XML editor will process XML files that are invalid or not
well-formed. The editor uses heuristics to open a file using the best interpretation
of the tagging that it can. For example, an element with a missing end tag
is simply assumed to end at the end of the document. As you make updates to
a file, the editor incrementally reinterprets your document, changing the
highlighting, tree view, and so on. Many formation errors are easy to spot
in the syntax highlighting, so you can easily correct obvious errors on-the-fly.
However, there will be other cases when it will be beneficial to perform formal
validation on your documents.</p>
<div class="p"><span>You can validate your file by selecting it in the
Navigator view, right-clicking it, and clicking <b> <span class="uicontrol">Validate XML file</span>.</b></span></div>
<div class="skipspace"><p>Any validation problems are indicated in the Problems view. For
more details about a problem, right-click on the problem message and click <b> <span class="uicontrol">Show
Details</span></b>. </p>
<div class="skipspace"><p>In the Problems view, you can double-click on individual errors,
and you will be taken to the invalid tag in the file, so that you can make
corrections. </p>
<p><b>Note</b>: If you receive an error message indicating
that the Problems view is full, you can increase the number of error messages
allowed by selecting <b> <span class="menucascade"><span class="uicontrol">Properties</span> &gt; <span class="uicontrol">Validation</span></span></b> from the project's pop-up menu and specifying the maximum number
of error messages allowed. You must select the <b> <span class="uicontrol">Override validation
preferences</span> </b>check box in order to be able to do this.</p>
well, you can set up a project's properties so that different types of project
resources are automatically validated when you save them. From a project's
pop-up menu select <b> <span class="uicontrol">Properties</span></b>, then select
<b> <span class="uicontrol">Validation</span></b>.
Any validators you can run against your project will be listed in the Validation
page. </p>
<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 />