How can I change the content some nodes in an XML file programmatically using PHP?
The important point is, that the file contains comments and white-spaces, which should be preserved.
Example of the file:
<!-- my config -->
<config>
<global>
<install>
<date/>
</install>
<resources>
<default_setup>
<connection>
<host>localhost</host>
<username/>
<password/>
<dbname>foo</dbname>
<!-- <dbname>bar</dbname> -->
<model>mysql4</model>
...