How do I access the Errors->Error-Message and Errors->Error->Code values?
This is the error message I'm getting. It looks like it is an empty object but you can
see the values.
object(SimpleXMLElement)#2 (0) { } NULL
$request = file_get_contents("http://free.apisigning.com/onca/xml?".$allparameter);

$parsed_xml = simplexml_load_string($request);

if (strpos($request, NEEDLE)=== false){

$result= $parsed_xml->Items->Item->ItemAttributes->ProductGroup;

$category= (string) $result;
}else{

 $message= $parsed_xml->Message;
 var_dump($message);
$code= $parsed_xml->Errors->Error['Code'];
var_dump($code);
}

I printed out all the parsed_xml elements.
thanks,

SimpleXMLElement Object (
[RequestId] => d83170cc-8278-403c-9863-995f0f180dd3
[Arguments] => SimpleXMLElement Object (
[Argument] => Array (
[0] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => Operation [Value] => ItemLookup ) )
[1] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => Service [Value] => AWSECommerceService ) )
[2] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => Signature [Value] => gSsaBMZVFSj2KUFXHLA8ZEPrd3Wi3PN/uHkIkTecWuU= ) )
[3] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => Version [Value] => 2009-01-06 ) ) [4] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => ItemId [Value] => B000BUR1 ) ) [5] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => IdType-ASIN ) )
[6] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => AWSAccessKeyId [Value] => AKIAIETJLADYILLAACBA ) )
[7] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => Timestamp [Value] => 2010-05-12T20:25:46Z ) ) ) ) [RequestProcessingTime] => 0.0067310000000000 )

SimpleXMLElement Object (
[Request] => SimpleXMLElement Object (
[IsValid] => True [ItemLookupRequest] => SimpleXMLElement Object (
[Condition] => New
[DeliveryMethod] => Ship
[IdType] => ASIN
[MerchantId] => Amazon
[OfferPage] => 1
[ItemId] => B000BUR1
[ResponseGroup] => Small
[ReviewPage] => 1
[ReviewSort] => -SubmissionDate
[VariationPage] => All )
[Errors] => SimpleXMLElement Object (
[Error] => SimpleXMLElement Object (

 => AWS.InvalidParameterValue 
		[Message] => B000BUR1 is not a valid value for ItemId. Please change this value and retry your request. ) ) ) 
)
    Write a Reply...