I am trying to get value from xml attributes. But it returns only 3 values "resCode,message,Pid" not able to get "orderno,orderdate". This is my xml value which is coming in $data variable.
<ns2:orderresponse xmlns="http://vo.services.order.com/base" xmlns:ns2="http://vo.services.order.com/createorder/response">
<rescode>111</rescode>
<messages><message>Success</message></messages>
<Pid>4555544</Pid>
<ns2:orderno>A2131589</ns2:orderno>
<ns2:orderdate>20171109</ns2:orderdate>
</ns2:orderresponse>
I am using this to get xml attributes value.
$xmlData = new SimpleXMLElement($data);
print_r(xml2array($xmlData));