|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-04 13:37 UTC] guillaume dot forget at espci dot fr
[2004-09-04 19:01 UTC] chregu@php.net
[2004-09-05 15:29 UTC] guillaume dot forget at espci dot fr
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 02:00:01 2025 UTC |
Description: ------------ Hi! I'm using domxml function for modifying xml files. But when I put acute (?,?,?,?,?,...), and try a DomElement->set_attribute(...), the resulting dom object is truncated at the acute place. I do not think the problem come from the DomObj->dump_mem() or DomObj->dump_file(...) functions because both gave the same result. If I remove the acutes, it works fine. Reproduce code: --------------- $xmlfile="test.xml"; $text="c'est l'?t? !"; $domobj = domxml_open_file ($xmlfile); $node = $domobj->last_child(); $test_node = $domobj->create_element("balise2"); $balise = $node->append_child($poly_node); $balise->set_attribute (test,$text); echo $domobj->dump_mem(); XML file (test.xml): <?xml version="1.0" encoding="ISO-8859-1"?> <balise1 /> Expected result: ---------------- <?xml version="1.0" encoding="ISO-8859-1"?> <balise1><balise2 test="c'est l'?t? !"/></balise1> Actual result: -------------- <?xml version="1.0" encoding="ISO-8859-1"?> <balise1>