When you validate your XML file, the XML validator will check to see that your file is valid and well-formed.
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.
You can validate your file by selecting it in the Navigator view, right-clicking it, and clicking Validate. 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.
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 Properties, then select Validation. Any validators you can run against your project will be listed in the Validation page.