title: Xml string to array, or to get his attributes
body: <p>I have the following string:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;string xmlns="http://tempuri.org/UKash/Service1"&gt;&lt;UKashTransaction&gt;&lt;txCode&gt;99&lt;/txCode&gt;&lt;txDescription&gt;Failed&lt;/txDescription&gt;&lt;settleAmount&gt; &lt;settleAmount&gt;&lt;transactionId&gt;1341481253EDFC871620&lt;/transactionId&gt;&lt;changeIssueVoucherNumber&gt; &lt;changeIssueVoucherNumber&gt;&lt;changeIssueVoucherCurr&gt; &lt;changeIssueVoucherCurr&gt;&lt;changeIssueAmount&gt; &lt;changeIssueAmount&gt;&lt;changeIssueExpiryDate&gt; &lt;changeIssueExpiryDate&gt;&lt;ukashTransactionId&gt; &lt;ukashTransactionId&gt;&lt;currencyConversion&gt; &lt;currencyConversion&gt;&lt;errCode&gt;219&lt;/errCode&gt;&lt;errDescription&gt;Invalid Voucher Number&lt;/errDescription&gt; &lt;UKashTransaction&gt;&lt;/string&gt;&lt;/xml&gt;
  </code></pre>
  
  <p>And I want to get some attributes of that string, like txDescrition, and so on, I tried different variations but can't get result. I am using php, if anyone can help I will really appreciate it since I am blocked.</p>
  
  <p>UPDATE:</p>
  
  <p>Problem is that I do not format string to be valid so I use curl and this is what I am getting from the gateway:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;string xmlns="http://tempuri.org/UKash/Service1"&gt;&amp;lt;UKashTransaction&amp;gt;&amp;lt;txCode&amp;gt;99&amp;lt;/txCode&amp;gt;&amp;lt;txDescription&amp;gt;Failed&amp;lt;/txDescription&amp;gt;&amp;lt;settleAmount&amp;gt;&amp;lt;/settleAmount&amp;gt;&amp;lt;transactionId&amp;gt;13414821393ED286BF2A&amp;lt;/transactionId&amp;gt;&amp;lt;changeIssueVoucherNumber&amp;gt;&amp;lt;/changeIssueVoucherNumber&amp;gt;&amp;lt;changeIssueVoucherCurr&amp;gt;&amp;lt;/changeIssueVoucherCurr&amp;gt;&amp;lt;changeIssueAmount&amp;gt;&amp;lt;/changeIssueAmount&amp;gt;&amp;lt;changeIssueExpiryDate&amp;gt;&amp;lt;/changeIssueExpiryDate&amp;gt;&amp;lt;ukashTransactionId&amp;gt;&amp;lt;/ukashTransactionId&amp;gt;&amp;lt;currencyConversion&amp;gt;&amp;lt;/currencyConversion&amp;gt;&amp;lt;errCode&amp;gt;219&amp;lt;/errCode&amp;gt;&amp;lt;errDescription&amp;gt;Invalid Voucher Number&amp;lt;/errDescription&amp;gt;&amp;lt;/UKashTransaction&amp;gt;&lt;/string&gt;
  </code></pre>
  
  <p>Tnx.</p>