#48502 [Opn->Bgs]: Error in constructor for DOMElement
| From: | rasmus@php.net | Date: | Tue, 09 Jun 2009 05:58:08 +0000 |
| Subject: | #48502 [Opn->Bgs]: Error in constructor for DOMElement | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-138128@lists.php.net to get a copy of this message | ||
ID: 48502
Updated by: rasmus@php.net
Reported By: trex6 at mail dot ru
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: GNU/Linux
PHP Version: 5.2.9
New Comment:
If you use saveXML() it does. If you use saveHTML(), it doesn't
because that is how it is supposed to be in HTML. If you want XHTML,
use saveXML()
Previous Comments:
------------------------------------------------------------------------
[2009-06-09 05:35:39] trex6 at mail dot ru
Description:
------------
I want add img element to my xml document.
Reproduce code:
---------------
$imgPic = new DOMElement("img");
$ParentElement->appendChild($imgPic);
$imgPic->setAttribute("src","./1.jpg");
Expected result:
----------------
<img src="./1.jpg" />
Actual result:
--------------
<img src="./1.jpg">
Script doesn`t generate closled '/' for tag img.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48502&edit=1