Nie wiem, czy to prawda, ale brzmi sensownie:
The XML_PARSE_PEDANTIC flag in libxml2 is used when parsing an XML document. When this flag is set, the parser will enforce strict conformance to the XML specification and will return an error if it encounters any deviations from the specification. This flag is useful when parsing XML documents that are meant to be used in a production environment and need to adhere to strict standards.
With the XML_PARSE_PEDANTIC flag set, the parser will check for things like proper use of encoding, well-formedness of the document structure, proper use of namespaces, and proper use of attribute values. If any of these checks fail, the parser will return an error and stop parsing the document.
This flag is in contrast to the XML_PARSE_RECOVER flag, which allows the parser to recover from errors and continue parsing the document, even if it deviates from the XML specification. The XML_PARSE_RECOVER flag is useful when parsing XML documents that may have been created by hand or by an application that is not strict about adhering to the XML specification.
Źródło oczywiste