ID: 32209 Comment by: Jared dot Williams1 at ntlworld dot com Reported By: md2perpe at gmail dot com Status: Open Bug Type: DOM XML related Operating System: * PHP Version: 5CVS-2005-03-06 New Comment:
saveHTML is correctly using SGML processing instruction close. HTML isnt XML. Use saveXML for XML/XHTML. Previous Comments: ------------------------------------------------------------------------ [2005-03-06 22:35:42] md2perpe at gmail dot com Description: ------------ According to http://www.w3.org/TR/REC-xml/#sec-pi a processing instruction should begin with <?something and end with ?>. But DOMDocument::createProcessingInstruction doesn't output the questionmark at the end. Reproduce code: --------------- <?php $doc = new DOMDocument(); $pi = $doc->createProcessingInstruction('name', 'content'); $doc->appendChild($pi); echo $doc->saveHTML(); ?> Expected result: ---------------- <?name content?> Actual result: -------------- <?name content> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32209&edit=1