!DOCTYPE creation viadom implementation

[email protected] (Jaanus Heeringson)
Newsgroups php.xml.dev
Message-ID <[email protected]>
I'm having a hard time creating the !DOCTYPE instruction. As far as i
know i need to use the domimplementation approach, but if there is some
other way I'd like to hear it. Here is my code:

<?php
$doctype=domImplementation::createDocumentType("html",
"-//W3C//DTD XHTML 1.0 Transitional//EN",
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd");
$docRoot=domImplementation::createDocument('http://www.w3.org/1999/xhtml','html:html',$doctype);
$docRoot->encoding='utf-8';
print($docRoot->saveXML());
?>

My current workaround is importing a "stub" document containing
everything i want, but that is not really satisfactory...

/Jaanus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.