解析肥皂响应并显示网址

时间:2016-10-28 09:21:41

标签: php xml soap

我正在尝试解析此XML的SOAP响应:

$xml_body = '<?xml version="1.0" encoding="utf-8"?>
              <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                 <soap:Body>
                    <Interop_PushResponse xmlns="http://sample.org/webservices/">
                      <Interop_PushResult>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Response Code="200"&gt;&lt;Description&gt;Update completed successfully&lt;/Description&gt;&lt;URL&gt;/Patient/PatientView.aspx?pid=96&lt;/URL&gt;&lt;/Response&gt;
                      </Interop_PushResult>
                    </Interop_PushResponse>
                  </soap:Body>
              </soap:Envelope>';

我要做的是获取<URL>标记值/Patient/PatientView.aspx?pid=96并将其添加到某个Web URL,然后在成功的SOAP请求时显示完整的URL地址响应周期。我已经尝试按照How to parse SOAP XML?中的说明进行操作,但它对我无效,但没有显示任何响应。我非常需要帮助。 TIA。

0 个答案:

没有答案
相关问题