src/Reader/Xml.php
public function read($string)
    {
        try {
            $wasUsingErrors = libxml_use_internal_errors();
            @$xmlObject = simplexml_load_string($string);
            libxml_use_internal_errors($wasUsingErrors);
            if ($xmlObject) {
                return $this->recurseToArray($xmlObject);
            }
        } catch (\Exception $e) {
            // Do nothing
        }
        return null;
    }
public function read($string)
    {
        try {
            $wasUsingErrors = libxml_use_internal_errors();
            @$xmlObject = simplexml_load_string($string);
            libxml_use_internal_errors($wasUsingErrors);
            if ($xmlObject) {
                return $this->recurseToArray($xmlObject);
            }
        } catch (\Exception $e) {
            // Do nothing
        }
        return null;
    }
public function read ( $ string ) { try { $ wasUsingErrors = libxml_use_internal_errors ( ) ; @ $ xmlObject = simplexml_load_string ( $ string ) ; libxml_use_internal_errors ( $ wasUsingErrors ) ; if ( $ xmlObject ) { return $ this -> recurseToArray ( $ xmlObject ) ; } } catch ( \ Exception $ e ) { // Do nothing } return null ; }
Attempt to read an XML document
@param string $string
@return array|null
Attempt to read an XML document