I have the following XML code
<epp:epp xmlns:epp="urn:ietf:params:xml:ns:epp-1.0">
<epp:response>
<epp:result code="1000">
<epp:msg>Contact Info Command completed successfully</epp:msg>
</epp:result>
<epp:resData>
<contact:infData xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>con12</contact:id>
<contact:status s="ok"/>
<contact:postalInfo type="loc">
<contact:name>Name</contact:name>
<contact:org/>
<contact:addr>
<contact:street>streer</contact:street>
<contact:street>street</contact:street>
<contact:street/>
<contact:city>City</contact:city>
<contact:sp/>
<contact:pc>186</contact:pc>
<contact:cc>AA</contact:cc>
</contact:addr>
</contact:postalInfo>
<contact:voice>0000000</contact:voice>
<contact:fax>000000000</contact:fax>
<contact:email>[email protected]</contact:email>
</contact:infData>
</epp:resData>
</epp:response>
</epp:epp>
I'm having difficulties getting values from the XML string using simplexml_load_string
I can get the results in all node starting with epp: such as epp:msg uinsg the following code
$objects = simplexml_load_string($result);
$objects->children('epp', true)->response->result->msg;
I just cant seem to get the values below
<contact:infData xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>con12</contact:id>
<contact:status s="ok"/>
<contact:postalInfo type="loc">
<contact:name>Name</contact:name>
<contact:org/>
<contact:addr>
<contact:street>streer</contact:street>
<contact:street>street</contact:street>
<contact:street/>
<contact:city>City</contact:city>
<contact:sp/>
<contact:pc>186</contact:pc>
<contact:cc>AA</contact:cc>
</contact:addr>
</contact:postalInfo>
<contact:voice>0000000</contact:voice>
<contact:fax>000000000</contact:fax>
<contact:email>[email protected]</contact:email>
</contact:infData>
I would also need to know how to get the code value in <epp:result code="1000">
Any help/pointers would be appreciated,