public static function parse($xml)
    {
        $backup = libxml_disable_entity_loader(true);

        $result = self::normalize(simplexml_load_string(self::sanitize($xml), 'SimpleXMLElement', LIBXML_COMPACT | LIBXML_NOCDATA | LIBXML_NOBLANKS));

        libxml_disable_entity_loader($backup);

        return $result;
    }
public static function parse($xml)
    {
        $backup = libxml_disable_entity_loader(true);

        $result = self::normalize(simplexml_load_string(self::sanitize($xml), 'SimpleXMLElement', LIBXML_COMPACT | LIBXML_NOCDATA | LIBXML_NOBLANKS));

        libxml_disable_entity_loader($backup);

        return $result;
    }
public static function parse ( $ xml ) { $ backup = libxml_disable_entity_loader ( true ) ; $ result = self :: normalize ( simplexml_load_string ( self :: sanitize ( $ xml ) , 'SimpleXMLElement' , LIBXML_COMPACT | LIBXML_NOCDATA | LIBXML_NOBLANKS ) ) ; libxml_disable_entity_loader ( $ backup ) ; return $ result ; }
XML to array.

@param string $xml XML string

@return array
XML to array .