blob: ce22a1e07129787a158c827caa3d3a0cc40cbd04 [file] [log] [blame]
kpriceef160682006-08-29 18:08:31 +00001<?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">
2<html lang="en-us" xml:lang="en-us">
syeshinbefd53e2005-07-27 18:16:40 +00003<head>
kpriceef160682006-08-29 18:08:31 +00004<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
kpriceb59c9f62008-04-02 21:24:37 +00005<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" />
6<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
kpriceef160682006-08-29 18:08:31 +00007<meta content="public" name="security" />
8<meta content="index,follow" name="Robots" />
9<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))' />
10<meta content="task" name="DC.Type" />
11<meta name="DC.Title" content="Validating XML files" />
12<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." />
13<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." />
14<meta content="XML files, validating" name="DC.subject" />
15<meta content="XML files, validating" name="keywords" />
16<meta scheme="URI" name="DC.Relation" content="../topics/cwxmledt.html" />
17<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html" />
18<meta content="XHTML" name="DC.Format" />
19<meta content="twxvalid" name="DC.Identifier" />
20<meta content="en-us" name="DC.Language" />
21<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
syeshinbefd53e2005-07-27 18:16:40 +000022<title>Validating XML files</title>
syeshin66078272005-09-20 16:53:38 +000023</head>
syeshinbefd53e2005-07-27 18:16:40 +000024<body id="twxvalid"><a name="twxvalid"><!-- --></a>
25
kpriceef160682006-08-29 18:08:31 +000026
syeshinbefd53e2005-07-27 18:16:40 +000027<h1 class="topictitle1">Validating XML files</h1>
kpriceef160682006-08-29 18:08:31 +000028
29
30
31
syeshind0bdb8e2005-10-27 17:44:14 +000032<div><p>When you validate your XML file, the XML validator will check to
33see that your file is valid and well-formed.</p>
kpriceef160682006-08-29 18:08:31 +000034
35<div class="section"><p>The XML editor will process XML files that are invalid or not
syeshinbefd53e2005-07-27 18:16:40 +000036well-formed. The editor uses heuristics to open a file using the best interpretation
37of the tagging that it can. For example, an element with a missing end tag
38is simply assumed to end at the end of the document. As you make updates to
39a file, the editor incrementally reinterprets your document, changing the
40highlighting, tree view, and so on. Many formation errors are easy to spot
41in the syntax highlighting, so you can easily correct obvious errors on-the-fly.
42However, there will be other cases when it will be beneficial to perform formal
43validation on your documents.</p>
kpriceb59c9f62008-04-02 21:24:37 +000044<p>You can validate your file by selecting
45it in the Navigator view, right-clicking it, and clicking <span class="uicontrol">Validate</span>.
46Any validation problems are indicated in the Problems view. You can double-click
47on individual errors, and you will be taken to the invalid tag in the file,
48so that you can make corrections.</p>
syeshinbefd53e2005-07-27 18:16:40 +000049</div>
kpriceef160682006-08-29 18:08:31 +000050
kpriceb59c9f62008-04-02 21:24:37 +000051<div class="section"><div class="note"><span class="notetitle">Note:</span> If you receive an error message indicating that the Problems
52view is full, you can increase the number of error messages allowed by clicking <span class="menucascade">
53<span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span></span> and
54selecting <span class="menucascade"><span class="uicontrol">General</span> &gt; <span class="uicontrol">Markers</span>
55</span>. Select the <span class="uicontrol">Use marker limits</span> check
56box and change the number in the <span class="uicontrol">Limit visible items per group</span> field.</div>
57<p>You
58can set up a project's properties so that different types of project resources
59are automatically validated when you save them. From a project's pop-up menu,
60click <span class="uicontrol">Properties</span>, then select <span class="uicontrol">Validation</span>.
kpriceef160682006-08-29 18:08:31 +000061Any validators you can run against your project will be listed in the Validation
62page.</p>
syeshinbefd53e2005-07-27 18:16:40 +000063</div>
64
syeshin66078272005-09-20 16:53:38 +000065</div>
lmandel79573072006-03-30 03:29:16 +000066
kpriceef160682006-08-29 18:08:31 +000067<div><div class="relconcepts"><strong>Related concepts</strong><br />
68<div><a href="../topics/cwxmledt.html" title="The XML editor is a tool for creating and viewing XML files.">XML editor</a></div>
69</div>
70<div class="relinfo"><strong>Related information</strong><br />
kprice8ca223b2007-04-05 03:35:57 +000071<div><a href="../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html">Validating code in enterprise applications</a></div>
lmandel79573072006-03-30 03:29:16 +000072</div>
73</div>
74
syeshinbefd53e2005-07-27 18:16:40 +000075</body>
76</html>