XML parsing children problems

lourlemuttTus

New Member
I'm working on a script that connects to a remote API and receives information in XML.The problem I'm having is I can't to get parse domain:ns right.XML below:\[code\]$xml= '<?xml version="1.0" encoding="UTF-8"?><response xmlns:domain="http://www.eurodns.com/domain" xmlns:eurodns="http://www.eurodns.com/eurodns"> <extension> <eurodns:domain> <domain:ns addr="176.31.236.123">ns1.it-joan.pl</domain:ns> <domain:ns addr="89.72.43.135">ns2.it-joan.pl</domain:ns> </eurodns:domain> </extension></response>'; $xml = new SimpleXMLElement($xml); foreach( $xml->resData as $value ) { $array[] = $value->children('http://www.eurodns.com/eurodns'); }\[/code\]
 
Back
Top