title: Accessing parent of a SimpleXML element results in "Array"
body: <p>Hello I have an XML code like this:</p>
  
  <pre><code>&lt;article&gt;
    &lt;title&gt;&lt;![CDATA[IEEE Transactions on]]&gt;&lt;/title&gt;
    &lt;articleinfo&gt;
      &lt;articleseqnum&gt;13&lt;/articleseqnum&gt;
      &lt;idamsid&gt;0b0000648011bcfb&lt;/idamsid&gt;
  .............
  </code></pre>
  
  <p>I try to access the parent of an element with SimpleXML like this:</p>
  
  <pre><code>$xmlUrl = "example.xml"; // XML feed file/URL
  
  $xmlStr = file_get_contents($xmlUrl);
  
  $xmlObj = simplexml_load_string($xmlStr);
  
  $titles = $xmlObj-&gt;xpath("//title");
  
  foreach ($titles as $title)
  {
     $parent_title = $title-&gt;xpath("parent::*");
  
     echo "Parent element of title: ". $parent_title."&lt;/br&gt;";
  
  }
  </code></pre>
  
  <p>But I take this result:</p>
  
  <pre><code>Parent element of title: Array
  </code></pre>
  
  <p>Instead of </p>
  
  <pre><code>Parent element of title: article
  </code></pre>
  
  <p>What is maybe the problem? Thank you in advance!</p>