title: can't get a value with SimpleXML from wiitdb.xml
body: <p>I ask for help cause I did everything but i cant get the synopsis value. my code is:</p>
  
  <pre><code>&lt;?php
  $xml=simplexml_load_file("wiitdb.xml") or die("Error: Cannot create object");
  $b = 'D2SE18';
  $a = $xml-&gt;xpath("//game/id[.='" . $b ."']/parent::*");
  $result = $a[0];
  
  echo "name: " . $result['name'] . "&lt;br&gt;";
  echo "ID: " . $result-&gt;id . "&lt;br&gt;";
  echo "type: " . $result-&gt;type . "&lt;br&gt;";
  echo "region: " . $result-&gt;region . "&lt;br&gt;";
  echo "languages: " . $result-&gt;languages . "&lt;br&gt;";
  echo "title EN: " . $result-&gt;locale[0]-&gt;title . "&lt;br&gt;";
  echo "synopsis EN: " . $result -&gt;locale[0]-&gt;children('synopsis', TRUE) . "&lt;br&gt;";
  print_r($a);
  
  ?&gt;
  </code></pre>
  
  <p>what it makes is look for an ID an then show the values that are parents of that element.</p>
  
  <p>When I  run it, it shows:</p>
  
  <pre><code>name: Deca Sports 2 (Demo) (USA) (EN,FR,ES)
  ID: D2SE18
  type: 
  region: NTSC-U
  languages: EN,FR,ES
  title EN: Deca Sports 2 (Demo)
  synopsis EN: 
  
  Array ( [0] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [name] =&gt; Deca Sports 2 (Demo) (USA) (EN,FR,ES) ) [id] =&gt; D2SE18 [type] =&gt; SimpleXMLElement Object ( ) [region] =&gt; NTSC-U [languages] =&gt; EN,FR,ES [locale] =&gt; Array ( [0] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [lang] =&gt; EN ) [title] =&gt; Deca Sports 2 (Demo) [synopsis] =&gt; SimpleXMLElement Object ( ) ) [1] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [lang] =&gt; ES ) [title] =&gt; Deca Sports 2 (Demo) [synopsis] =&gt; Prueba tus destrezas deportivas a través de una gran variedad de actividades en Deca Sports 2. Afina tus habilidades en cada deporte en y crea tu propio equipo personalizado con el nuevo editor. Exhibe tus destrezas en una variedad de opciones de un solo jugador o compite con amigos y familiares en los modos multijugador. ) [2] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [lang] =&gt; ZHTW ) [title] =&gt; 運動大集錦2 試玩版(美) [synopsis] =&gt; SimpleXMLElement Object ( ) ) [3] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [lang] =&gt; ZHCN ) [title] =&gt; 德卡运动会2 试玩版(美) [synopsis] =&gt; SimpleXMLElement Object ( ) ) ) [developer] =&gt; HUDSON SOFT CO., LTD. [publisher] =&gt; Hudson Entertainment, Inc. [date] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [year] =&gt; 2009 [month] =&gt; 1 [day] =&gt; 1 ) ) [genre] =&gt; sports [rating] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [type] =&gt; ESRB [value] =&gt; E ) ) [wi-fi] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [players] =&gt; 0 ) ) [input] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [players] =&gt; 4 ) [control] =&gt; Array ( [0] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [type] =&gt; wiimote [required] =&gt; true ) ) [1] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [type] =&gt; nunchuk [required] =&gt; true ) ) ) ) [rom] =&gt; SimpleXMLElement Object ( [@attributes] =&gt; Array ( [version] =&gt; [name] =&gt; Deca Sports 2 (Demo) (USA) (EN,FR,ES).iso [size] =&gt; 4699979776 ) ) ) )
  </code></pre>
  
  <p>even if i try with </p>
  
  <pre><code>echo "synopsis EN: " . $result-&gt;locale[0]-&gt;synopsis . "&lt;br&gt;";
  </code></pre>
  
  <p>it don't show me the value "synopsis".</p>
  
  <p>How can i get it?</p>
  
  <p>An example of the xml file is: </p>
  
  <pre><code>&lt;game name="Deca Sports 2 (Demo) (USA) (EN,FR,ES)"&gt;
          &lt;id&gt;D2SE18&lt;/id&gt;
          &lt;type/&gt;
          &lt;region&gt;NTSC-U&lt;/region&gt;
          &lt;languages&gt;EN,FR,ES&lt;/languages&gt;
          &lt;locale lang="EN"&gt;
              &lt;title&gt;Deca Sports 2 (Demo)&lt;/title&gt;
              &lt;synopsis&gt;It's a top-ten all over again as Deca Sports 2 offers another all-you-can-play buffet of ten games anyone can enjoy. The all-around collection has something for everyone, with tennis, darts, ice hockey, motorcycle racing, synchronized swimming, speed skating, downhill skiing, bocce, kendo, and dodgeball. Multiple single and multiplayer modes offer tournaments, head-to-head matches, skill contests, and league play. Use the Team Editor to customize everything about your squad, including your team's name, logo, and colors, plus the looks and skills of the players themselves. And, just to make sure the playing field is level, beginners can learn the ropes of any of the sports in Tutorial Mode. (The Demo lets you play 4 sports of the 10!)&lt;/synopsis&gt;
          &lt;/locale&gt;
          &lt;locale lang="ES"&gt;
              &lt;title&gt;Deca Sports 2 (Demo)&lt;/title&gt;
              &lt;synopsis/&gt;
          &lt;/locale&gt;
          &lt;locale lang="ZHTW"&gt;
              &lt;title&gt;運動大集錦2 試玩版(美)&lt;/title&gt;
              &lt;synopsis/&gt;
          &lt;/locale&gt;
          &lt;locale lang="ZHCN"&gt;
              &lt;title&gt;德卡运动会2 试玩版(美)&lt;/title&gt;
              &lt;synopsis/&gt;
          &lt;/locale&gt;
          &lt;developer&gt;HUDSON SOFT CO., LTD.&lt;/developer&gt;
          &lt;publisher&gt;Hudson Entertainment, Inc.&lt;/publisher&gt;
          &lt;date year="2009" month="1" day="1"/&gt;
          &lt;genre&gt;sports&lt;/genre&gt;
          &lt;rating type="ESRB" value="E"/&gt;
          &lt;wi-fi players="0"/&gt;
          &lt;input players="4"&gt;
              &lt;control type="wiimote" required="true"/&gt;
              &lt;control type="nunchuk" required="true"/&gt;
          &lt;/input&gt;
          &lt;rom version="" name="Deca Sports 2 (Demo) (USA) (EN,FR,ES).iso" size="4699979776"/&gt;
      &lt;/game&gt;
  </code></pre>