jbashir Posted February 14, 2008 Share Posted February 14, 2008 I want to parse XML coming from this URL: http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=1DN1Y0GF2HTSA76NRQG2&Operation=BrowseNodeLookup&ResponseGroup=BrowseNodeInfo&BrowseNodeId=1000 I want Children->BrowseNode->BrowseNodeId and Children->BrowseNode->Name from this XML. I have tried this code: $url = http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=1DN1Y0GF2HTSA76NRQG2&Operation=BrowseNodeLookup&ResponseGroup=BrowseNodeInfo&BrowseNodeId=1000 $xml = new SimpleXMLElement($url,null,true); foreach($xml as $node) { echo $node->BrowseNode->BrowseNodeId."-". $BrowseNode->BrowseNode->Name; } But I only get this output : 1000 - Subjects (And I do not get further output). Can someone please help me to solve this problem. Link to comment https://forums.phpfreaks.com/topic/91039-xml-parsing/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.