I am new to handle XML. I have created an XML using JMS\Serializer.
$serializer = \JMS\Serializer\SerializerBuilder::create()->build();
$payload = $serializer->serialize($data, 'xml');
I try to serialize the $data array in to XML and pass it as a payload to a service/API. I am doing this in laravel 5.x.
The only problem I am unable to solve is that I need to avoid html encoding of special characters in the $payload XML as I need to pass the string 'a&b' as '<Name>a&b</Name>
' instead of the default '<Name>a&b</Name>
'.
Thanks in advance.