|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-11-15 03:52 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 01:00:01 2025 UTC |
Description: ------------ print_r on a domtext object whose content has been modified will still display the old content. Reproduce code: --------------- <pre> <?php dl("php_domxml.dll"); //for windows systems only $oXml = xmldoc('<one><two/><three>blah</three></one>'); $xpresult = xpath_eval(xpath_new_context($oXml), "/one/three"); $var = $xpresult->nodeset[0]->child_nodes(); $var[0]->set_content('hello'); echo($oXml->dump_mem()); print_r($var[0]); ?> </pre> Expected result: ---------------- <pre> <?xml version="1.0"?> <one><two/><three>hello</three></one> domtext Object ( [type] => 3 [name] => #text [content] => hello [0] => 4 [1] => 6475536 ) </pre> Actual result: -------------- <pre> <?xml version="1.0"?> <one><two/><three>hello</three></one> domtext Object ( [type] => 3 [name] => #text [content] => blah [0] => 4 [1] => 6475536 ) </pre>