title: Change xml response to array or object
body: <p>I got xml responce by soap api like</p>
  
  <pre><code>$data = &lt;users&gt;&lt;user id="1028240" enabled="True" mustChangePassword="False"&gt;
  &lt;username&gt;&lt;![CDATA[Priye1]]&gt;&lt;/username&gt;
  &lt;firstName&gt;&lt;![CDATA[Priye]]&gt;&lt;/firstName&gt;
  &lt;middleName&gt;&lt;/middleName&gt;
  &lt;lastName&gt;&lt;![CDATA[Priye]]&gt;&lt;/lastName&gt;
  &lt;email&gt;&lt;/email&gt;
  &lt;company&gt;&lt;/company&gt;
  &lt;/users&gt;
  </code></pre>
  
  <p>When i convert $data into simple xml object by</p>
  
  <pre><code>$array = simplexml_load_string($data);
  </code></pre>
  
  <p>i got object but object does not contain any value.</p>
  
  <p>After converting object as follow</p>
  
  <p>[users] => Array
              (
                  [user] => Array
                      (
                          [0] => Array
                              (
                                  [@attributes] => Array
                                      (
                                          [id] => 1028240
                                          [enabled] => True
                                          [mustChangePassword] => False
                                      )</p>
  
  <pre><code>                            [username] =&gt; Array
                                  (
                                  )
  
                              [firstName] =&gt; Array
                                  (
                                  )
  
                              [middleName] =&gt; Array
                                  (
                                  )
  
                              [lastName] =&gt; Array
                                  (
                                  )
  
                              [email] =&gt; Array
                                  (
                                  )
  
                              [company] =&gt; Array
                                  (
                                  )
  
                              [address] =&gt; Array
                                  (
                                  )
  
                              [city] =&gt; Array
                                  (
                                  )
  
                              [province] =&gt; Array
                                  (
                                  )
  }
  </code></pre>
  
  <p>}</p>