The XML | Validate (F8) command enables you to validate XML documents against DTDs, XML Schemas, and other schemas. You can specify that a document be automatically validated when a file is opened or saved (Tools | Options | File). The Validate command also carries out a well-formedness check before checking validity, so there is no need to use the Check Well-Formedness command before using the Validate command.
If a document is valid, a successful validation message is displayed in the Messages window.
Otherwise, a message that describes the error is displayed. You can click on the links in the error message to jump to the node in the XML document where the error was found.
|Note:||The validation error indicators and smart fixes described above are refreshed only when the XML | Validate (F8) command is executed; they are not updated in the background. So, after correcting an error, you must run the Validate (F8) command again to make sure that the error has indeed been fixed.|
|Note:||The Messages window has nine tabs. The validation result is always displayed in the active tab. So you can validate one XML document in Tab-1 and retain the result in that tab. To validate a second document, switch to Tab-2 (or Tab-3 if you like) before running the check. If you do not switch tabs, Tab-1 (or the active tab) will be overwritten with the results of the latest validation.|
Validating from the Project window
The Validate command can also be applied to a file, folder, or group of files in the active project. Select the required file or folder in the Project Window (by clicking on it). Then click XML | Validate or F8. Invalid files in a project will be opened and made active in the Main Window, and the File is not valid error message will be displayed..
Automating validation with RaptorXML 2020
RaptorXML is Altova's standalone application for XML validation, XSLT transformation, and XQuery transformation. It can be used from the command line, via a COM interface, in Java programs, and in .NET applications. Validation tasks can therefore be automated with the use of RaptorXML. For example, you can create a batch file that calls RaptorXML to perform validation on a set of documents and sends the output to a text file. See the RaptorXML documentation for details.