After passing SOAP response using simplexml i got the following out put. How can i get the value of attributes of domain ie, name and avail.
code used:
Inspired by @Wrikken's answer, I wrote a simple to use class that works with PHP 5.3:
class SoapParser extends SoapClient {
private $xml;
function __construct($options) {
$options['location'] = $options['uri'] = 'dummy';
parent::__construct(null, $options);
}
public function __doRequest($request, $location, $action, $version,
$one_way = 0)
{
return $this->xml;
}
public function parse($xml) {
$this->xml = $xml;
return $this->dummyFunction();
}
}
Usage example:
$soapParser = new SoapParser(array('soap_version' => 'SOAP_1_1'));
try {
var_dump($soapParser->parse($response));
} catch (Exception $e) {
die($e->getMessage());
}