I've searched the entire web looking for a way to update / modify/ change/ alter the elements of an xml file and found NOTHING!
So here it is, the defninitive way to "Change XML elements with PHP" rather than adding / appending new ones. This uses XPATH:
<?php
$xml = new DOMDocument;
$xml->preserveWhiteSpace = false;
$file='about.xml';
$xml->Load($file);
$xpath = new DOMXPath($xml);
$query='/regions/branch';
$entries = $xpath->query($query);
foreach ($entries as $entry)
{
$entry->firstChild->nodeValue="like this!";
echo $entry->firstChild->nodeValue;
}
$xml->save($file);
?>