Bug #15412 Updated: set_content() and new_child() methods not creating wellformed XML
| From: | chregu@php.net | Date: | Wed, 06 Feb 2002 23:45:27 +0000 |
| Subject: | Bug #15412 Updated: set_content() and new_child() methods not creating wellformed XML | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-79429@lists.php.net to get a copy of this message | ||
ID: 15412
Updated by: chregu@php.net
Reported By: ken@positive-edge.com
Status: Bogus
Bug Type: DOM XML related
Operating System: WindowsXP
PHP Version: 4.1.1
New Comment:
Sorry. wanted to give a quick answer and not just bogusifying it.
It's a libxml2 issue. It's not a wrong behaviour.
See
http://mail.gnome.org/archives/xml/2001-April/msg00079.html
for a discussion about that (and it seems, that there is no real
reason, why ' is converted, but it stayed this way. complain at
the libxml2 people, if you want this changed)
Previous Comments:
------------------------------------------------------------------------
[2002-02-06 18:43:14] chregu@php.net
This is not a bug. Please double-check the documentation available
at http://www.php.net/manual/ and the instructions on how
to report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2002-02-06 17:34:25] ken@positive-edge.com
There is a *large* bug in the the set_content() method (as well as the
new_child() method)
For instance, if i try to add a new node with content containing an
entity like this, it will convert the entity to the original
character.
$bugItemNode->new_child( 'title', '' );
$bugItemNode->set_content( 'HtmlTagContainer's add() method does
not accept strings as an argument.' );
But when you use $doc->dumpmem(), the output will be the following:
...<title>HtmlTagContainer's add() method does not accept strings as an
argument.</title>
Notice that it contains an apostrophe and it is NOT '. This is a
huge bug since it does not output wellformed XML files.
Obviously, if you simply write the apostrophe character, it will do
nothing to convert it to ' as well. This is serious and will
hinder MANY applications that need to parse the resultant XML content.
Developers, please fix this.
Ken Egervari
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15412&edit=1