$xmlStr = <<<XML
<?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>
<client_insetResponse xmlns="http://127.0.0.1/webservices/">
<client_insetResult>0|</client_insetResult>
</client_insetResponse>
</soap:Body>
</soap:Envelope>
XML;
$xmlObj = simplexml_load_string($xmlStr);
$xmlObj->registerXPathNamespace('soap', 'http://schemas.xmlsoap.org/soap/envelope/');
$result = $xmlObj->xpath("soap:Body");
print_r($result);
网友评论