level . ',code=' . $error->code . ',line=' . $error->line . ',col=' . $error->column . ',msg=' . trim($error->message); } /** * Format a list of errors as a string. * * This fucntion takes an array of LibXMLError objects and creates a string with all the errors. * Each error will be separated by a newline, and the string will end with a newline-character. * * @param $errors An array of errors. * @return A string representing the errors. An empty string will be returned if there were no * errors in the array. */ public static function formatErrors($errors) { assert('is_array($errors)'); $ret = ''; foreach($errors as $error) { $ret .= self::formatError($error) . "\n"; } return $ret; } } ?>