im trying to read an xml as a string that i get from a json from a webservice, when I check the request the xml looks fine, but when I print said json from php, all the start tags are ignored. Is there a reason for this behavior?
{
"response": "ok",
"xmlData": "<Tag1><Tag2>data</Tag2><Tag3><Tag4>data</Tag4></Tag3></tag1>"
}
php output:
{
"response":"ok",
"xmlData":"data<\/Tag2>data<\/tag4><\/Tag3><\/tag1>"
}
function webPostRequest($resourceURL, $postContent)
{
$url = $resourceURL;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postContent);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
return $result;
}