src/Utility/IntuitErrorHandler.php
public static function IsValidXml($inputString)
    {
        if (0!==strpos($inputString, '<')) {
            return false;
        }

        try {
            $doc = simplexml_load_string($inputString);
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
public static function IsValidXml($inputString)
    {
        if (0!==strpos($inputString, '<')) {
            return false;
        }

        try {
            $doc = simplexml_load_string($inputString);
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
Validates the input string is a well formatted xml string
@param string inputString Input xml string
@return bool True if 'inputString' is a valid xml