php xml attribute value replace
<p>Say i have an xml file of this nature
 
  
   
    some data
   
  
</p>

<p>I wan to replace attributes of each later using one function in php:
example say: 
replaceAttribute("collections","somecollection,"newcollection");</p>
