<Root>
...
<A CHANGE_THIS="Dont_ChengeME">
<B></B>
</A>
...
</Root>
trying to change the attribute name of element A to something of my choice, using php's simpleXML API. here's what i've done:
$xml = simplexml_import_dom($xmldom);
$query = "root/A[@]";
$result = $xml->xpath($query);
if(!empty($result))
$result['CHANGE_THIS'] = "Blalalalal"; //i believe this is where am doing it wrongly
All attempts failed. any idea ?