src/SitemapParser.php
protected function generateXMLObject($xml)
    {
        try {
            libxml_use_internal_errors(true);
            return new SimpleXMLElement($xml, LIBXML_NOCDATA);
        } catch (\Exception $e) {
            return false;
        }
    }
protected function generateXMLObject($xml)
    {
        try {
            libxml_use_internal_errors(true);
            return new SimpleXMLElement($xml, LIBXML_NOCDATA);
        } catch (\Exception $e) {
            return false;
        }
    }
protected function generateXMLObject ( $ xml ) { try { libxml_use_internal_errors ( true ) ; return new SimpleXMLElement ( $ xml , LIBXML_NOCDATA ) ; } catch ( \ Exception $ e ) { return false ; } }
Generate the \SimpleXMLElement object if the XML is valid

@param string $xml
@return \SimpleXMLElement|false
Generate the \ SimpleXMLElement object if the XML is valid