title: SimpleXML: Working with XML containing namespaces
body: <p>I am trying to get to the geo information off the google-picasa API. This is the original XML:</p>
  
  <pre><code>&lt;georss:where&gt;
    &lt;gml:Point&gt;
      &lt;gml:pos&gt;35.669998 139.770004&lt;/gml:pos&gt;
    &lt;/gml:Point&gt;
  &lt;/georss:where&gt;
  </code></pre>
  
  <p>I already have come this far, with:</p>
  
  <pre><code>$ns_geo=$item-&gt;children($namespace['georss']);
  $geo=$ns_geo-&gt;children($namespace['gml']);
  </code></pre>
  
  <p><code>var_dump($geo)</code> will output</p>
  
  <pre><code>object(SimpleXMLElement)#34 (1) { 
    ["Point"]=&gt; object(SimpleXMLElement)#30 (1) { 
      ["pos"]=&gt; string(18) "52.373801 4.890935" 
    } 
  } 
  </code></pre>
  
  <p>but</p>
  
  <pre><code>echo (string)$geo-&gt;position or (string)$geo-&gt;position-&gt;pos; 
  </code></pre>
  
  <p>will give me nothing. Is there something obvious that i am doing wrong?</p>