[DUG-TO] XML output

Andre Molnar andre at becircle.com
Fri Feb 20 15:51:20 EST 2009


I've not worked with flex and XMLRPC - but flex has an XML parser built
in. I'm not sure if it has an XMLRPC encoder built in, but if not I'm
sure someone has written one.

I haven't worked with AMFPHP content generation on the server side - nor
have I really dug into it. But from what it sounds like a flex or flash
app includes dynamicly built 'stuff' from the server side right into the
app via an httprequest. The 'stuff' is in a native format (actionscript
objects [i'm guessing]).

I am working with JSON data.  Flex doesn't come with a built in JSON
parser, but one is available in the as3-corelib library.  It seems to be
doing its job just fine.

But - with services module, it doesn't matter what format (i.e. "Server"
in services module lingo) that you use.  The "Services" you write using
the services API output their data, and its the "Server's"
responsibility to send it back in the right format.

In other words - you sort out what you want to return - do it once - and
then can always change your mind on what format you send back if you
think its easier to work with XML or JSON or whatever.

There are a number of pre-built services including ones for views.

So you could make a call to: http://example.com/services/JSON and post
the following parameters.
method = views.getView
name = name_of_view

Then you'd get back the contents of that view in JSON format

andre
Andrew Mallis wrote:
> 
> 
> I got the views_node_feed
> module working,
> but I need to hand code all the themed XML content, which I don't mind
> doing, but it isn't very forward-looking and high maintenance as
> solutions go.
> 
> The output you're talking about sounds pretty good.
> Which of the 3 options you've mentioned is the easiest to implement?
> 
> Andrew Mallis
> http://andrewmallis.com
> skype: andrew_mallis  |  gTalk/Jabber:  andrew.mallis
> 
> 462 Delaware Avenue
> Toronto  |  Ontario   |  M6H 2T9
> h:    416-533-2132
> c:    416-939-4502
> 
> 
> 
> 
> 
> 
> On 20-Feb-09, at 10:54 AM, Andre Molnar wrote:
> 
>> Andrew,
>>
>> Actually, I've been working with Flex and Drupal data recently.
>>
>> I would suggest looking at the services module and the XML-RPC server OR
>> AMFPHP for native actionscript data - or JSON for that matter.
>>
>> With that you get views services that you get for free. i.e. you can
>> just access a views.getView() method - which will return your views data
>> in whatever format you like (xml, json, amf etc)
>>
>> andre
>> Andrew Mallis wrote:
>>>
>>> Hi gang,
>>>
>>> In Drupal 5,
>>> Im trying to output the equivalent of a full node list view
>>> but in an XML format.
>>>
>>> Creating a feed doesn't give me access to all my CCK fields.
>>>
>>> The endgoal is to create XML for a flash font-end to parse.
>>>
>>> I've been looking into XML-RPC and also the services module.
>>> There seem to be a wide range of opinions on the matter and an even
>>> wider range of bugs associated with each solution.
>>>
>>> Does anyone have experience implementing a customize XML output for a
>>> node list?
>>>
>>>
>>>
>>> *Andrew Mallis*
>>> *Ideograph*
>>> http://ideograph.ca
>>> skype: andrew_mallis  |  gTalk/Jabber:  andrew.mallis
>>>
>>> *@ The Centre for Social Innovation*
>>> 215 Spadina Ave, Suite 400
>>> Toronto  |  Ontario  |  Canada  |  M5T 2C7
>>> cell:  416-939-4502
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> DUG-TO mailing list
>>> DUG-TO at lists.openject.com
>>> http://lists.openject.com/listinfo/dug-to
>>
>> _______________________________________________
>> DUG-TO mailing list
>> DUG-TO at lists.openject.com
>> http://lists.openject.com/listinfo/dug-to
> 
> _______________________________________________
> DUG-TO mailing list
> DUG-TO at lists.openject.com
> http://lists.openject.com/listinfo/dug-to



More information about the DUG-TO mailing list