Hi, I'm currently trying to figure out the best way to produce a Google Base Atom feed (which should not be sent to Google directly but delivered by our platform). * My first guess was to use the Zend_Gdata_Gbase component. But as I figured out, this component is currently meant to read feeds and to send single entries to Google. I managed to get the feed for a single element by calling $service->prepareRequest('', null, null, $myGbaseEntry), but I found no apparent way to assemble a whole feed containing several entries (I don't want to connect to google directly at all...) * My second try was to assemble the feed myself by using Zend_Feed with a builder: $feed = Zend_Feed::importBuilder($builder, 'atom'); So I wrote a class extending the Zend_Feed_Builder_Interface, but this did not work either, because the mapping function ignores all custom namespaces, producing only atom feeds with default attributes * So I guess I'm up to assemble my feed "low level" by using Zend_Feed directly, which is also not so easy as I thought, since the only documentation about producing feeds with this component is http://framework.zend.com/manual/en/zend.feed.modifying-feed.html This tells me how to create a new Entry-Object, but not how to append this to my feed. I'd expect an "append"-method for Zend_Feed_Atom, but it has only a __set function. And this piece of code here doesn't work at all:
Zend_Feed::registerNamespace('g', 'http://base.google.com/ns/1.0'); $feed = new Zend_Feed_Atom(null, ''); //It needs 'something' for the constructor $entry1 = new Zend_Feed_Entry_Atom(); $entry1->title = 'entry1'; $entry1->{'g:id'} = 1; $entry2 = new Zend_Feed_Entry_Atom(); $entry2->title = 'entry2'; $entry2->{'g:id'} = 2; $feed->entry = array($entry1, $entry2); echo($feed->saveXML()); So I guess I'm up to assemble it "really low level" using DOMDocument? (I noticed that the Gdata component doesn't use Zend_Feed either, but the php DOM classes instead). Or am I missing something here? Thanks, Alex -- View this message in context: http://www.nabble.com/Producing-Google-Base-atom-feeds-tp20488222p20488222.html Sent from the Zend Framework mailing list archive at Nabble.com.