Parsers are generally classified as validating or nonvalidating. A validating parser is able to read
the DTD and determine whether or not the XML document conforms to it. If the document conforms
to the DTD, it is referred to as valid. If the document fails to conform to the DTD but is
syntactically correct, it is well formed but not valid. By definition, a valid document is well
formed.