在php中查看来自web服务响应的xml内容结果

在php中查看来自web服务响应的xml内容结果,php,xml,web-services,soap,schema,Php,Xml,Web Services,Soap,Schema,我正在创建连接到web服务并显示web服务结果的php页面, web服务响应的xml如下所示: <GetUserResponse xmlns="http://the web service"> <GetUserResult> <xsd:schema>schema</xsd:schema>xml </GetUserResult> </GetUserResponse> schemaxml

我正在创建连接到web服务并显示web服务结果的php页面, web服务响应的xml如下所示:

<GetUserResponse xmlns="http://the web service">
  <GetUserResult>
    <xsd:schema>schema</xsd:schema>xml
  </GetUserResult>
</GetUserResponse>

schemaxml
我需要知道我从服务中获得的xml内容, 如何处理它或在我的页面中显示它


解决了的 我能够使用以下方法解决此问题:

$xml=simplexml\u load\u字符串($result)

XML文件:myxml.XML
戈塔姆
凯瓦迪亚
我的标题
身体内容在这里!!!!
要在PHP中读取带有对象的返回:
XML File : myxml.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<note>
    <to>Gauttam</to>
    <from>Kevadia</from>
    <heading>My Heading</heading>
    <body>Body Content Here!!!!</body>
</note> 

TO read in PHP return with Object :

<?php
    $xml=simplexml_load_file("myxml.xml");
    echo $xml->to . "<br>";
    echo $xml->from . "<br>";
    echo $xml->heading . "<br>";
    echo $xml->body;
    // IF XML file having multiple value retrieve it dynamic with array 
?>