ID:               26650
 User updated by:  msw at seebi dot de
 Reported By:      msw at seebi dot de
-Status:           Feedback
+Status:           Open
 Bug Type:         DOM XML related
 Operating System: Win XP Prof
 PHP Version:      4.3.4
 New Comment:

As you suggested, I've checked out the new stable release. The result
is the same, each character '&' is converted into &amp.


Previous Comments:
------------------------------------------------------------------------

[2003-12-18 03:11:27] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

[2003-12-17 10:18:16] msw at seebi dot de

Description:
------------
When I'm producing a new xml file (domxml_new_doc())  which contains
some decimal entities (e.g. for the german characters ß Ä
ö and so on) and saving this file to disk (dump_file()) each
character '&' in each decimal entity is converted into &amp. This
appears with PHP 4.3.0 and 4.3.4 (Win). PHP 4.3.1, 4.3.2 and 4.3.3 not
tested. 

Reproduce code:
---------------
<?php


$content="&#223; - &#196;";

$dom = domxml_new_doc("1.0");
$root = $dom->add_root("list");

 $ab=$dom->create_element("absatz");
 $ab->set_attribute("id","10");
 $text=$dom->create_element("text");
 $content=$dom->create_text_node($content);
 $text->append_child($content);
 $ab->append_child($text);
 $root->append_child($ab);

$dom->dump_file("test.xml", false, false);


?>


Expected result:
----------------
the file test.xml should look like this:

<?xml version="1.0"?>
<list><absatz id="10"><text>&#223; -&#196;</text></absatz></list>

Actual result:
--------------
The actual result is:

<?xml version="1.0"?>
<list><absatz id="10"><text>&amp;#223;
-&amp;#196;</text></absatz></list>


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26650&edit=1

Reply via email to