我需要阅读从Web服务收到的XML文件的内容。
当我看到生成页面的源代码时,我可以看到: http://pastebin.com/hnnzAcPH
我在我的网页上看到Id:string(398)“”,但不是xml,我如何访问和读取xml标签SOAP:Body?
答案 0 :(得分:1)
我自己解决了,在我的情况下:
$xml = $XmlArray->children("soap", true)->Body->children();
答案 1 :(得分:-1)
最简单的方法是从响应中创建一个Simple XML对象。所以你可以浏览所有元素。
$xml = simplexml_load_string($response);
print_r($xml);