note 18829 added to function.domxml-node-set-content
| From: | ken at positive-edge dot com | Date: | Wed, 06 Feb 2002 22:31:26 +0000 |
| Subject: | note 18829 added to function.domxml-node-set-content | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26315@lists.php.net to get a copy of this message | ||
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 hindle MANY applications. Developers, please fix
this.
Ken Egervari
--
http://www.php.net/manual/en/function.domxml-node-set-content.php
http://master.php.net/manage/user-notes.php?action=edit+18829
http://master.php.net/manage/user-notes.php?action=delete+18829
http://master.php.net/manage/user-notes.php?action=reject+18829