title: Parsing XML in laravel: get @attributes value
body: <p>I have a XML file with account information I need to be loaded in my user's table in my database.</p>
  
  <p>I found this package for Laravel for XML parsing:</p>
  
  <p><a href="https://github.com/orchestral/parser" rel="nofollow noreferrer">https://github.com/orchestral/parser</a></p>
  
  <p>I came thus far that I can load my XML but now I am stuck. Here's the code:</p>
  
  <pre><code>$xml = XmlParser::load(url('/xml/DEBTORS.xml'));
      dd($xml);
      $user = $xml-&gt;parse([
         'Name' =&gt; ['uses','Accounts.Account.Name'],
      ]);
  </code></pre>
  
  <p>$user Name returns NULL</p>
  
  <p><a href="https://i.stack.imgur.com/V15nu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V15nu.png" alt="enter image description here"></a></p>
  
  <p>Part of the XML for example:</p>
  
  <pre><code>&lt;Account code="1004" status="A" type="C"&gt;
   &lt;Name&gt;example name here&lt;/Name&gt;
   &lt;Phone&gt;emaple phone here&lt;/Phone&gt;
  </code></pre>
  
  <p>For example I want to reach Account Code in @attributes and assign that to ID.</p>
  
  <p>Any help is appreciated.</p>