title: XML file to PHP array (w/attributes)
body: <p>i haven't really worked with xml files before, but now i'm trying to get an xml file into a php array or object. 
  the xml file looks like this: (it's for translating a web app)</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;content language="de"&gt; 
   &lt;string name="login"&gt;Login&lt;/string&gt;
   &lt;string name="username"&gt;Benutzername&lt;/string&gt;
   &lt;string name="password"&gt;Passwort&lt;/string&gt;
  &lt;/content&gt;
  </code></pre>
  
  <p>i tried the following: </p>
  
  <pre><code>$xml = new SimpleXMLElement("de.xml", 0, 1);
  print_r($xml);
  </code></pre>
  
  <p>unfortunately, the values of the 'name' attribute are for some reason not in the php object. i'm looking for a way that allows me to retrieve the xml values by the name attribute.</p>
  
  <p>for instance:</p>
  
  <pre><code>$xml['username'] //returns "Benutzername"
  </code></pre>
  
  <p>how can this be done?
  appreciate your help :) cheers!</p>