syeshin | befd53e | 2005-07-27 18:16:40 +0000 | [diff] [blame^] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE html |
| 3 | PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 4 | <html> |
| 5 | <head> |
| 6 | <link rel="stylesheet" type="text/css" href="../../com.ibm.help.doc/swg_info_common.css" /> |
| 7 | <title>Validating XML files</title> |
| 8 | <script language="JavaScript"> |
| 9 | function popup_window( url, id, width, height ) |
| 10 | { |
| 11 | popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + ',left=,top=' ); |
| 12 | popup.focus(); |
| 13 | } |
| 14 | </script><script language="JavaScript" src="help/liveHelp.js"></script></head> |
| 15 | <body id="twxvalid"><a name="twxvalid"><!-- --></a> |
| 16 | |
| 17 | <h1 class="topictitle1">Validating XML files</h1> |
| 18 | <div><div class="skipspace"><p>The XML editor will process XML files that are invalid or not |
| 19 | well-formed. The editor uses heuristics to open a file using the best interpretation |
| 20 | of the tagging that it can. For example, an element with a missing end tag |
| 21 | is simply assumed to end at the end of the document. As you make updates to |
| 22 | a file, the editor incrementally reinterprets your document, changing the |
| 23 | highlighting, tree view, and so on. Many formation errors are easy to spot |
| 24 | in the syntax highlighting, so you can easily correct obvious errors on-the-fly. |
| 25 | However, there will be other cases when it will be beneficial to perform formal |
| 26 | validation on your documents.</p> |
| 27 | </div> |
| 28 | <div class="p"><span>You can validate your file by selecting it in the |
| 29 | Navigator view, right-clicking it, and clicking <span class="uicontrol">Validate XML file</span>.</span></div> |
| 30 | <div class="skipspace"><p>Any validation problems are indicated in the Problems view. For |
| 31 | more details about a problem, right-click on the problem message and click <span class="uicontrol">Show |
| 32 | Details</span>. </p> |
| 33 | </div> |
| 34 | <div class="skipspace"><p>In the Problems view, you can double-click on individual errors, |
| 35 | and you will be taken to the invalid tag in the file, so that you can make |
| 36 | corrections. </p> |
| 37 | <p><b>Note</b>: If you receive an error message indicating |
| 38 | that the Problems view is full, you can increase the number of error messages |
| 39 | allowed by selecting <span class="menucascade"><span class="uicontrol">Properties</span> > <span class="uicontrol">Validation</span></span> from the project's pop-up menu and specifying the maximum number |
| 40 | of error messages allowed. You must select the <span class="uicontrol">Override validation |
| 41 | preferences</span> check box in order to be able to do this.</p> |
| 42 | <p>As |
| 43 | well, you can set up a project's properties so that different types of project |
| 44 | resources are automatically validated when you save them. From a project's |
| 45 | pop-up menu select <span class="uicontrol">Properties</span>, then select <span class="uicontrol">Validation</span>. |
| 46 | Any validators you can run against your project will be listed in the |
| 47 | Validation page. </p> |
| 48 | </div> |
| 49 | </div> |
| 50 | |
| 51 | <div><p><b class="relconceptshd">Related concepts</b><br /> |
| 52 | <a href="../topics/cwxmledt.html" title="The XML editor is a tool for creating and viewing XML files">XML editor</a><br /> |
| 53 | </p> |
| 54 | </div><p> |
| 55 | (C) Copyright IBM Corporation 2000, 2005. All Rights Reserved. |
| 56 | </p> |
| 57 | </body> |
| 58 | </html> |