I'm trying to process an imported XML file and make the text in one of the nodes
<Name>SOMETHINGTOMAKELOWERCASE</Name>
lowercase
<Name>somethingtomakelowercase</Name>
So far I got:
$xml = file_get_contents($xmlfile);
$xml = preg_replace('/<Name>(.*)<\/Name>/e', '<Name>' . strtolower($1) . '</Name>',$xml);
fwrite(fopen($xmlfile, 'wb'), $xml);
I've tried about ten different versions of the regexp, but none of them will work. Could you please point me in the right direction as to the correct regexp?