diff --git a/src/XmlDocumentReader.php b/src/XmlDocumentReader.php index cc792b5..925177b 100644 --- a/src/XmlDocumentReader.php +++ b/src/XmlDocumentReader.php @@ -73,6 +73,7 @@ public function loadFromXmlString(string $source): XmlDocumentReader $prevUseInternalErrors = \libxml_use_internal_errors(true); try { + libxml_clear_errors(); $this->internalDomDocument->loadXML($source); if (libxml_get_last_error()) { throw new RuntimeException("Invalid XML detected.");