コピー/貼り付けのバックアップとして、xml 文字列全体 (ヘッダー、タグなどを含む) を電子メールに含めたいと考えています。以下を使用する場合:
<?php
$xml_content = file_get_contents('http://www.w3schools.com/xml/note.xml');
echo $xml_content;
?>
トーベ ジャニ リマインダー 今週末は私を忘れないで!
次のような完全な文字列ではなく:
<?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>