I have tried to decode html tags in xml but the functions of the html tags was not worked. Here is my code:
<?php
$sample = '<p>  Sample</p>
<p>Sample 2</p>';
header('Content-type: text/xml');
$output = '<rss version="2.0">';
$output .= '<channel>';
$output = '<description>.utf8_encode(html_entity_decode($sample)).</description>';
echo($output);
$output .= '</channel>';
$output .= '</rss>';
?>
The output was a plain text. The function of <p>
tag was not working. and when I remove utf8_encode
it error the
.