<?php
require_once('xml_doctype.inc');
$dom = new DOMDocument('1.0','UTF-8');
$dom->preserveWhiteSpace false;
$dom->formatOutput true;

$myPage = new docType($dom);
$xmlHtml $myPage->document();

$xmlfile 'content.xml';
$buffer file_get_contents($xmlfile);
$tmpDOM = new DOMDocument('1.0','utf-8');
$tmpDOM->loadXML($buffer);

$nodeList $tmpDOM->getElementsByTagName('head');
$impHead $nodeList->item(0);
$xmlHead $dom->importNode($impHead,true);

$nodeList $tmpDOM->getElementsByTagName('body');
$impBody $nodeList->item(0);
$xmlBody $dom->importNode($impBody,true);

$xmlHtml->appendChild($xmlHead);
$xmlHtml->appendChild($xmlBody);

$myPage->sendpage();
?>