Hello everyone,
Could someone tell me how to avoid these errors? Testing for existance of namespace?
It starts when I want to add geo information to an array I thought it was enough to do this.
(from the picasa api feed)
foreach($feed->xpath('//gml:pos') as $pos)
{
$feed_arr['geo'][$i]['pos'] = (string)$pos[0];
$i++;
}
<b>Warning</b>: SimpleXMLElement::xpath() [<a href='/phpmanual/simplexmlelement.xpath'>simplexmlelement.xpath</a>]: Undefined namespace prefix in <b>/home/woonbel/public_html/tsa.nl/applicatie/lib/gpicasa.class.php</b> on line <b>390</b><br />
<br />
<b>Warning</b>: SimpleXMLElement::xpath() [<a href='/phpmanual/simplexmlelement.xpath'>simplexmlelement.xpath</a>]: xmlXPathEval: evaluation failed in <b>/home/woonbel/public_html/tsa.nl/applicatie/lib/gpicasa.class.php</b> on line <b>390</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/woonbel/public_html/tsa.nl/applicatie/lib/gpicasa.class.php</b> on line <b>390</b><br />
regards, Richard