I wish to include in an email the entire xml string (inlcuding headers, tags etc) as a backup to copy/paste. If I use the following:
<?php
$xml_content = file_get_contents('http://www.w3schools.com/xml/note.xml');
echo $xml_content;
?>
It shows: Tove Jani Reminder Don't forget me this weekend!
Rather than the full string which would be:
<?xml version="1.0" encoding="ISO-8859-1"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>