'; $xml .= ''; $xml .= 'en_CA'; $xml .= 'High'; $xml .= ''; $responseXml = sendHttpRequest($requestXmlBody, $serverUrl, $headers); if(stristr($responseXml, 'HTTP 404') || $responseXml == '') die('

Error sending request'); //Xml string is parsed and creates a DOM Document object $responseDoc = domxml_open_mem($responseXml); //get any error nodes $errors = $responseDoc->get_elements_by_tagname('Errors'); //if there are error nodes if(count($errors) > 0) { echo '

eBay returned the following error(s):'; //display each error //Get error code, ShortMesaage and LongMessage $code = $errors[0]->get_elements_by_tagname('ErrorCode'); $shortMsg = $errors[0]->get_elements_by_tagname('ShortMessage'); $longMsg = $errors[0]->get_elements_by_tagname('LongMessage'); //Display code and shortmessage echo '

', $code[0]->get_content(), ' : ', str_replace(">", ">", str_replace("<", "<", $shortMsg[0]->get_content())); //if there is a long message (ie ErrorLevel=1), display it if(count($longMsg) > 0) echo '
', str_replace(">", ">", str_replace("<", "<", $longMsg[0]->get_content())); } else //no errors { //NEED TO DISPLAY HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! } ?> WHAT SHOULD RETURN SHOULD LOOK LIKE THIS: AckCodeType string string ErrorClassificationCodeType token string string SeverityCodeType string string dateTime string CountryCodeType string CurrencyCodeType string string int string BuyerPaymentMethodCodeType string string string string string boolean boolean token int int int SiteCodeType int string string anyURI URLTypeCodeType