How to parse complicated XML
<p>I have this structure XML. And I am trying to parse it to an array but I am having a problem.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;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"&gt;
    &lt;CheckDealNoStatusResponse xmlns="http://tempuri.org/"&gt;
        &lt;CheckDealNoStatusResult&gt;
            &lt;xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&gt;
                &lt;xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="tbl" msdata:UseCurrentLocale="true"&gt;
                    &lt;xs:complexType&gt;
                        &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
                            &lt;xs:element name="tbl"&gt;
                                &lt;xs:complexType&gt;
                                    &lt;xs:sequence&gt;
                                        &lt;xs:element name="Temp1" type="xs:long" minOccurs="0" /&gt;
                                        &lt;xs:element name="Temp2" type="xs:string" minOccurs="0" /&gt;
                                        &lt;xs:element name="Temp3" type="xs:string" minOccurs="0" /&gt;
                                    &lt;/xs:sequence&gt;
                                &lt;/xs:complexType&gt;
                            &lt;/xs:element&gt;
                        &lt;/xs:choice&gt;
                    &lt;/xs:complexType&gt;
                &lt;/xs:element&gt;
            &lt;/xs:schema&gt;
            &lt;diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&gt;
                &lt;NewDataSet xmlns=""&gt;
                    &lt;tbl diffgr:id="tbl1" msdata:rowOrder="0"&gt;
                        &lt;Temp1&gt;12929011&lt;/Temp1&gt;
                        &lt;Temp2&gt;Pending&lt;/Temp2&gt;
                        &lt;Temp3&gt;Pending&lt;/Temp3&gt;
                    &lt;/tbl&gt;
                &lt;/NewDataSet&gt;
            &lt;/diffgr:diffgram&gt;
        &lt;/CheckDealNoStatusResult&gt;
        &lt;ErrorMsg /&gt;
    &lt;/CheckDealNoStatusResponse&gt;
&lt;/soap:Envelope&gt;
</code></pre>

<p>Im trying to parse it this way</p>

<pre><code>$parser = simplexml_load_string($smlString, "SimpleXMLElement", LIBXML_NOCDATA);

  echo "&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;";
        print_r( $parser );
        echo "&lt;/pre&gt;";
</code></pre>

<p>But Im only getting this.</p>

<pre><code>SimpleXMLElement Object
(
    [CheckDealNoStatusResponse] =&gt; SimpleXMLElement Object
        (
            [CheckDealNoStatusResult] =&gt; SimpleXMLElement Object
                (
                )

            [ErrorMsg] =&gt; SimpleXMLElement Object
                (
                )

        )

)
</code></pre>

<p>How can get these information </p>

<pre><code> &lt;Temp1&gt;12929011&lt;/Temp1&gt;
 &lt;Temp2&gt;Pending&lt;/Temp2&gt;
 &lt;Temp3&gt;Pending&lt;/Temp3&gt;
</code></pre>