XML that conforms to the rules defined in the XML specification, as well as the rules defined in the DTD or schema. The parser must understand the validity constraints of the XML specification and check the document for possible violations. If the parser finds any errors, it must report them to the XML application. The parser must also read the DTD, validate the document against it, and again report any violations to the XML application. Because all of this parsing and checking can take time and because validation might not always be necessary, XML supports the notion of the well-formed document.