#32209 [Com]: Missing ? in processing instruction
| From: | Jared dot Williams1 at ntlworld dot com | Date: | Mon, 07 Mar 2005 01:01:24 +0000 |
| Subject: | #32209 [Com]: Missing ? in processing instruction | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74994@lists.php.net to get a copy of this message | ||
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