Can't change XML element attributes using simpleXML. :s


 $xmlObj = simplexml_load_file('RepositorioXml/EppCreateDomain.xml');

$xmlObj->command->extension->children(self::EXT_URI_DOMAIN)->create->legitimacy->attributes('type', 'please');

//prepara
$xmlString = $xmlObj->asXML();

I was hopping that, by doing this, I was able to change the attribute type value with some value. - ‘please’.

I got nothing on my returned $xml.

What I’m I doing wrong? Any guess?

I don’t even know what can I var_dump here. :s

Please advice,
Márcio