blob: ce22a1e07129787a158c827caa3d3a0cc40cbd04 [file] [log] [blame]
<?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, 2008 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, 2008" />
<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="Validating XML files" />
<meta name="abstract" content="When you validate your XML file, the XML validator will check to see that your file is valid and well-formed." />
<meta name="description" content="When you validate your XML file, the XML validator will check to see that your file is valid and well-formed." />
<meta content="XML files, validating" name="DC.subject" />
<meta content="XML files, validating" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/cwxmledt.html" />
<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="twxvalid" 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>Validating XML files</title>
</head>
<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 class="section"><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>
<p>You can validate your file by selecting
it in the Navigator view, right-clicking it, and clicking <span class="uicontrol">Validate</span>.
Any validation problems are indicated 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>
</div>
<div class="section"><div class="note"><span class="notetitle">Note:</span> If you receive an error message indicating that the Problems
view is full, you can increase the number of error messages allowed by clicking <span class="menucascade">
<span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span></span> and
selecting <span class="menucascade"><span class="uicontrol">General</span> &gt; <span class="uicontrol">Markers</span>
</span>. Select the <span class="uicontrol">Use marker limits</span> check
box and change the number in the <span class="uicontrol">Limit visible items per group</span> field.</div>
<p>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,
click <span class="uicontrol">Properties</span>, then select <span class="uicontrol">Validation</span>.
Any validators you can run against your project will be listed in the Validation
page.</p>
</div>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../topics/cwxmledt.html" title="The XML editor is a tool for creating and viewing XML files.">XML editor</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html">Validating code in enterprise applications</a></div>
</div>
</div>
</body>
</html>