public static function xmlEncode($data, array $context = [])
    {
        $defaults = [
            'xml_root_node_name' => 'xml',
            'xml_format_output' => true,
            'xml_version' => '1.0',
            'xml_encoding' => 'utf-8',
            'xml_standalone' => false,
        ];

        return (new XmlEncoder())->encode($data, 'xml', array_replace($defaults, $context));
    }
public static function xmlEncode($data, array $context = [])
    {
        $defaults = [
            'xml_root_node_name' => 'xml',
            'xml_format_output' => true,
            'xml_version' => '1.0',
            'xml_encoding' => 'utf-8',
            'xml_standalone' => false,
        ];

        return (new XmlEncoder())->encode($data, 'xml', array_replace($defaults, $context));
    }
public static function xmlEncode ( $ data , array $ context = [ ] ) { $ defaults = [ 'xml_root_node_name' => 'xml' , 'xml_format_output' => true , 'xml_version' => '1.0' , 'xml_encoding' => 'utf-8' , 'xml_standalone' => false , ] ; return ( new XmlEncoder ( ) ) -> encode ( $ data , 'xml' , array_replace ( $ defaults , $ context ) ) ; }
xml encode.
xml encode .