Richard
Richard

Reputation: 4546

error when passing rss feed to php domDocument object

can anyone possibly point me in the right direction

I am using curl to get back a google picasa api feed. This all works well, with the autorisation and the fetching of the data, but now I want to expand a little bit in try'n to add,update tags,pics, geo-info from my site.

How can I pass the feed I got back with curl to the domDocument somehow??

this did not work

$dom = new DOMDocument();
$xml = $dom->load(trim($feed )); 
or
 $xml = $dom->loadXML($feed);

if I echo it directly I get an rss page in FF

echo trim($feed );

but

echo $xml;

will give a xml parse syntax error?

Also, if anyone has any links to work with google-api for PUT, DELETE, UPDATE operations that is not related to ZEND, but uses a different PHP approach, curl or something, that would be great.(code that's easyer to follow)

thanks, Richard

Upvotes: 0

Views: 390

Answers (1)

streetparade
streetparade

Reputation: 32878

Use $feed = simplexml_load_string($feedXml);

Upvotes: 1

Related Questions