title: PHP xpath won't return data
body: <p>im trying to filter out some informations from an XML file using PHP xpath, somehow the response seems always to be empty. Does anyone have an idea what could cause this?</p>
  
  <hr>
  
  <p><strong>Xml example:</strong></p>
  
  <pre><code>&lt;account&gt;
      &lt;a&gt;Information1&lt;/a&gt;
      &lt;b&gt;Information2&lt;/b&gt;
      &lt;c&gt;Informatio3&lt;/c&gt;
  &lt;/account&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>My actual code:</strong></p>
  
  <pre><code>   public static function user_cache($username) {
        $xml = @file_get_contents('xmlfile');
        $xml = @simplexml_load_string($xml);
        if ( $xml ) {
           $results = array(
              "userid" =&gt; $xml-&gt;xpath('a')
           );
        }
        else {
           $results['message'] = 'Unable to get data.';
        }
        return $results;
     }
  </code></pre>
  
  <hr>
  
  <pre><code>{
      "userid": []
  }
  </code></pre>