The libxml_get_last_error() function gets the last error from the libxml error buffer.
If successful, the function returns an error object. Returns FALSE on failure or if there are no errors in the libxml error buffer.
libxml_get_last_error()
<?phplibxml_get_last_error()?>