In previous tutorials you learned how to create XML documents and schemas that could be used to validate those documents for technical accuracy. What you didn't learn how to do, however, was actually carry out the validation of XML documents. Document validation isn't something you can carry out yourself with a pencil and piece of paper, or even a calculatorvalidation is an automated process carried out by a special software application known as a validation tool, or validator. Validation tools are a critical part of the XML development process because they allow you to determine the correctness of your documents.

In this tutorial you learned how document validation is carried out by XML applications. More specifically, you learned about standard and validating parsers and how they fit into the validation equation. You then learned how to use some of the different validation tools available for use in validating XML documents, including both online and local tools. And finally, you found out how to track down and repair errors in XML documents.



Is it possible to validate HTML web pages?


Strictly speaking, it isn't possible to validate HTML-based documents because HTML isn't actually an XML language and therefore doesn't conform to the rules of XML. However, you can code web pages in XHTML, which is a markup language that can be validated. XHTML is an XML-based language that is very similar to HTML but with the improved structure of XML. You learn all about XHTML in Tutorial 21, "Adding Structure to the Web with XHTML," including how to validate XHTML web pages.


Do I have to check a document for well formedness before moving on to checking it for validity?


No. I recommend the two-stage check on a document only because it helps to clarify the different types of errors commonly found in XML documents. Your goal should be to develop enough XML coding skills to avoid most well-formedness errors, which frees you up to spend most of your time tackling the peskier validity errors. Knowing this, at some point you may decide to jump straight into the validity check for documents as you gain experience.

by BrainBellupdated