note 71959 rejected from function.domnode-set-content by nlopess

From: Date: Tue, 26 Dec 2006 11:25:10 +0000
Subject: note 71959 rejected from function.domnode-set-content by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-120922@lists.php.net to get a copy of this message
Note Submitter: t_0_wolf at hotmail dot com ---- the XML file i wanna to edit is showing below : <map name="write-processors"> <newObject name="Archiver" class="org.archive.crawler.writer.ARCWriterProcessor"> <boolean name="enabled">true</boolean> <map name="filters"> </map> <boolean name="compress">true</boolean> <string name="prefix">blog22</string> <string name="suffix">apache_user</string> <integer name="max-size-bytes">100000000</integer> <stringList name="path"> <string>arcs</string> </stringList> <integer name="pool-max-active">5</integer> <integer name="pool-max-wait">300000</integer> <long name="total-bytes-to-write">0</long> </newObject> </map> i want to change the value of the blog and apache_user <string name="prefix">blog</string> <string name="suffix">apache_user</string> i am using the codes to do the job, but seems it doesn't work.. $node_array = $dom->get_elements_by_tagname("string"); foreach($node_array as $node) { $element = $node; $value = $element->get_attribute("name"); #echo "Attribute name: ", $value ,"<br>"; if( $value == "prefix"){ #echo "...."; #echo $valule; $content="temp"; $name_text_node = $element->first_child(); echo $name_text_node->get_content(); echo "<br>"; $name_text_node->set_content($content); echo $name_text_node->get_content(); echo "<br>"; } in the browser, it display that the content have been changed, but the related opened file is not changed.

« previous php.notes (#120922) next »