Parse SOAP Response using Simple XML PHP
<p>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.</p>

<p>code used:</p>

<pre><code> $xmlString = preg_replace("/(&lt;\/?)(\w+):([^&gt;]*&gt;)/", "$1$2$3", $result);    
       $xml = simplexml_load_string($xmlString);
       print_r($xml);



SimpleXMLElement Object([soapBody] =&gt; SimpleXMLElement Object ([CheckAvailabilityResponse] =&gt; SimpleXMLElement Object([CheckAvailabilityResult] =&gt; &amp;lt;?xml version="1.0" encoding="UTF-16"?&amp;gt;
&amp;lt;check&amp;gt;
    &amp;lt;domain name="MYNAMEISNIJIL.COM" avail="1" canBackorder="0"/&amp;gt;
&amp;lt;/check&amp;gt;) ))
</code></pre>
