src/Core/Convert.php
public static function xml2raw($val)
    {
        if (is_array($val)) {
            foreach ($val as $k => $v) {
                $val[$k] = self::xml2raw($v);
            }
            return $val;
        }

        // More complex text needs to use html2raw instead
        if (strpos($val, '<') !== false) {
            return self::html2raw($val);
        }

        return html_entity_decode($val, ENT_QUOTES, 'UTF-8');
    }
public static function xml2raw($val)
    {
        if (is_array($val)) {
            foreach ($val as $k => $v) {
                $val[$k] = self::xml2raw($v);
            }
            return $val;
        }

        // More complex text needs to use html2raw instead
        if (strpos($val, '<') !== false) {
            return self::html2raw($val);
        }

        return html_entity_decode($val, ENT_QUOTES, 'UTF-8');
    }
public static function xml2raw ( $ val ) { if ( is_array ( $ val ) ) { foreach ( $ val as $ k => $ v ) { $ val [ $ k ] = self :: xml2raw ( $ v ) ; } return $ val ; } // More complex text needs to use html2raw instead if ( strpos ( $ val , '<' ) !== false ) { return self :: html2raw ( $ val ) ; } return html_entity_decode ( $ val , ENT_QUOTES , 'UTF-8' ) ; }
Convert XML to raw text.
@uses html2raw()
@todo Currently &#xxx; entries are stripped; they should be converted
@param mixed $val
@return array|string
Convert XML to raw text .