I have an xml file that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg lang="nl">De transactie is succesvol afgerond.</msg>
</result>
<trID>
<clTRID>300100</clTRID>
<svTRID>602C9E44-3F79-564D-5A53-C9689F088A1C</svTRID>
</trID>
</response>
</epp>
I need the result code from the xml in a string. I already tried it with simpleXml :
$resCode = new \SimpleXMLElement($info);
$text = (string)$resCode->result;`
my xml is stored in $info
But this is not working. What am I doing wrong?