XML : Getting item inside an XML tag

I am working with the Amazon API and when I run the code, I get an error. The error is because of status not being success.

Here is the XML that I am trying to get the value of.

  <GetMatchingProductForId id="102154758742" type="UPC" staus="Client Error">    

I had this PHP code to find the id, but I am not sure if it would be the same.

  if(isset($items['Id'])){       $id = $items['Id'];   }else{      $id = 'No Id Found';  }    

I have code that checks if it is success. When it runs everything is fine until that item. Thanks for the help in advance. I appreciate it.

No comments:

Post a Comment