protected function startRecordingErrors() { $this->useInternalErrors = libxml_use_internal_errors(true); libxml_clear_errors(); }