About XML validation Validation checks a document against the rules of its schema.

A document can be well-formed and still invalid: the tags match, but an element is in the wrong place.