public function isXml($xmlString)
    {
        $previousValue = libxml_use_internal_errors(true);

        $simpleXml = simplexml_load_string($xmlString);

        libxml_use_internal_errors($previousValue);

        return false !== $simpleXml;
    }
public function isXml($xmlString)
    {
        $previousValue = libxml_use_internal_errors(true);

        $simpleXml = simplexml_load_string($xmlString);

        libxml_use_internal_errors($previousValue);

        return false !== $simpleXml;
    }
public function isXml ( $ xmlString ) { $ previousValue = libxml_use_internal_errors ( true ) ; $ simpleXml = simplexml_load_string ( $ xmlString ) ; libxml_use_internal_errors ( $ previousValue ) ; return false !== $ simpleXml ; }
Checks XML string for validity

@param string $xmlString

@return boolean
Checks XML string for validity