final public function serializeXml(array $fields)
    {
        $className = $this->stripNamespaceFromClassName($this);
        $output = '<'.$className.'>';
        foreach ($fields as $key => $value) {
            if (empty($value)) {
                continue;
            }
            // Unnecessary fields
            $key = str_replace(' ', '_', ucwords(str_replace(['_', '$', '%5F', '?'], [' ', 'N36', 'E5F', '98T'], $key)));
            $output .= '<'.$key.'>'.htmlspecialchars($value).'</'.$key.'>';
        }
        $output .= '</'.$className.'>';

        return $output;
    }
final public function serializeXml(array $fields)
    {
        $className = $this->stripNamespaceFromClassName($this);
        $output = '<'.$className.'>';
        foreach ($fields as $key => $value) {
            if (empty($value)) {
                continue;
            }
            // Unnecessary fields
            $key = str_replace(' ', '_', ucwords(str_replace(['_', '$', '%5F', '?'], [' ', 'N36', 'E5F', '98T'], $key)));
            $output .= '<'.$key.'>'.htmlspecialchars($value).'</'.$key.'>';
        }
        $output .= '</'.$className.'>';

        return $output;
    }
final public function serializeXml ( array $ fields ) { $ className = $ this -> stripNamespaceFromClassName ( $ this ) ; $ output = '<' . $ className . '>' ; foreach ( $ fields as $ key => $ value ) { if ( empty ( $ value ) ) { continue ; } // Unnecessary fields $ key = str_replace ( ' ' , '_' , ucwords ( str_replace ( [ '_' , '$' , '%5F' , '?' ] , [ ' ' , 'N36' , 'E5F' , '98T' ] , $ key ) ) ) ; $ output .= '<' . $ key . '>' . htmlspecialchars ( $ value ) . '</' . $ key . '>' ; } $ output .= '</' . $ className . '>' ; return $ output ; }
Called during array to xml parsing, create an string
of the xml to send for api based on the request values, for sustitution
of specials chars use E prefix instead of % for hexadecimal

@param array $fields Fields to convert

@return string

@todo
- Verify if the property exist on entity before send to zoho
Called during array to xml parsing create an string of the xml to send for api based on the request values for sustitution of specials chars use E prefix instead of % for hexadecimal