我正在调用一个返回XML文档的Web服务。当我调用它时,它返回以下内容:
resultsetrecordtxnref1013101155943920/txnrefchannelvisa/channelamount1000.00/amountpayment_date4/11/2013 3:59:43 PM/payment_datepayment_statussuccessful/payment_statusfield_valuesfield_valuesfieldnamesTest Test/namesacct_descFalse/acct_descacct_desc_order0/acct_desc_orderhiddenFalse/hiddendefaultvalue /xpath_field0/xpath_field/fieldfieldamount1000.00/amountacct_descFalse/acct_descacct_desc_order0/acct_desc_orderhiddenFalse/hiddendefaultvalue /xpath_field0/xpath_field/fieldfieldcurrencyNGN/currencyacct_descFalse/acct_descacct_desc_order0/acct_desc_orderhiddenFalse/hiddendefaultvalue /xpath_field0/xpath_field/fieldfieldemail_addresstest/email_addressacct_descFalse/acct_descacct_desc_order0/acct_desc_orderhiddenFalse/hiddendefaultvalue /xpath_field0/xpath_field/fieldfieldphone_number+2348031155249/phone_numberacct_descFalse/acct_descacct_desc_order0/acct_desc_orderhiddenFalse/hiddendefaultvalue /xpath_field0/xpath_field/fieldfieldmerch_txnref0/merch_txnrefacct_descFalse/acct_descacct_desc_order0/acct_desc_orderhiddenFalse/hiddendefaultvalue /xpath_field0/xpath_field/field/field_values/field_valuespayment_status_descriptionTransaction Successful - Approved/payment_status_description/record/resultset
这是有效的XML,因为当我使用simplexml_load_string
时,它可以在运行PHP 5.4的本地服务器上运行,但不能在我使用PHP 5.3的测试服务器上运行
答案 0 :(得分:1)
这是您的浏览器解析XML并忽略所有标记的结果。尝试查看页面源或使用可以处理XML的浏览器。
答案 1 :(得分:1)
出于某种原因设置启用php_openssl.dll
修复了问题。不确定为什么......但谷歌这么说