I'm having an issue where the following HTML is stored in my database:
Carer £4.20 per person<br />
And is being output to XML with DOMDocument, as follows:
$content = htmlspecialchars($page->content);
$xmlDoc = new DOMDocument();
$xmlDoc->formatOutput = true;
//create the root element
$root = $xmlDoc->appendChild(
$xmlDoc->createElement("document"));
$page->appendChild(
$xmlDoc->createElement("content", $content));
Resulting in
Carer £4.20 per person<br />
However, instead of the HEX encoding, is it possible to have the named HTML entities, e.g £ ?