You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by ALAA MURAD <al...@gmail.com> on 2009/10/19 17:07:59 UTC

Output to XML

Hi, I'm trying to create XML output for the blog as I want to create a
custom GWT theme. I don't want to use the velocity engine , I want to use
direct Java object so I can produce well formated XML.

Any idea ?

Example

Service.jsp?action=page&pageid=1

Out:

<Page>
<Title>Hello World</Title>
<Content>Welcome to the First Page<Content/>
</Page>

Thanks in advance

Re: Output to XML

Posted by ALAA MURAD <al...@gmail.com>.
Thank you all for the help, I like the feed idea WEB-INF/velocity/feeds.vm ,
so I will create a clone of that and modify it.

But how to request user's account ? so basically if I have a Tom and Mike,
and wants to get Mike's blog posts, how to pass that ?
So I'm not sure how to do those points:

1-I want to create a file name service.jsp and be connected to my service.vm
(Never used velocity )
2-I want to do call like this service.jsp?user=mike&action=post&post_id=4 ,
this should return the post as XML (I don't need help in doing the XML) I
just don't know who to get the service.jsp up and connect to volicity file !

Thanks in Advance.

On Mon, Oct 19, 2009 at 9:09 PM, Matt Raible <ma...@raibledesigns.com> wrote:

> What do you need to modify? The output generated follows the
> conventions/data established by RSS and Atom, so there's a good chance
> they use frameworks to generate their content. As for the specific
> files that do this, I'm unsure but hopefully one of the other
> developers can help you.
>
> Matt
>
> On Mon, Oct 19, 2009 at 12:04 PM, ALAA MURAD <al...@gmail.com> wrote:
> > First,  thanks for the quick response
> > If u could tell me what file that generate  the RSS /Atom feed ? as I
> need
> > to modify it
> >
> > Thanks in advance
> >
> > On Mon, Oct 19, 2009 at 6:10 PM, Matt Raible <ma...@raibledesigns.com>
> wrote:
> >
> >> I would recommend grabbing the Atom or RSS feed for the blog rather
> >> than the HTML output.
> >>
> >> On Mon, Oct 19, 2009 at 9:07 AM, ALAA MURAD <al...@gmail.com>
> wrote:
> >> > Hi, I'm trying to create XML output for the blog as I want to create a
> >> > custom GWT theme. I don't want to use the velocity engine , I want to
> use
> >> > direct Java object so I can produce well formated XML.
> >> >
> >> > Any idea ?
> >> >
> >> > Example
> >> >
> >> > Service.jsp?action=page&pageid=1
> >> >
> >> > Out:
> >> >
> >> > <Page>
> >> > <Title>Hello World</Title>
> >> > <Content>Welcome to the First Page<Content/>
> >> > </Page>
> >> >
> >> > Thanks in advance
> >> >
> >>
> >
>

Re: Output to XML

Posted by Matt Raible <ma...@raibledesigns.com>.
What do you need to modify? The output generated follows the
conventions/data established by RSS and Atom, so there's a good chance
they use frameworks to generate their content. As for the specific
files that do this, I'm unsure but hopefully one of the other
developers can help you.

Matt

On Mon, Oct 19, 2009 at 12:04 PM, ALAA MURAD <al...@gmail.com> wrote:
> First,  thanks for the quick response
> If u could tell me what file that generate  the RSS /Atom feed ? as I need
> to modify it
>
> Thanks in advance
>
> On Mon, Oct 19, 2009 at 6:10 PM, Matt Raible <ma...@raibledesigns.com> wrote:
>
>> I would recommend grabbing the Atom or RSS feed for the blog rather
>> than the HTML output.
>>
>> On Mon, Oct 19, 2009 at 9:07 AM, ALAA MURAD <al...@gmail.com> wrote:
>> > Hi, I'm trying to create XML output for the blog as I want to create a
>> > custom GWT theme. I don't want to use the velocity engine , I want to use
>> > direct Java object so I can produce well formated XML.
>> >
>> > Any idea ?
>> >
>> > Example
>> >
>> > Service.jsp?action=page&pageid=1
>> >
>> > Out:
>> >
>> > <Page>
>> > <Title>Hello World</Title>
>> > <Content>Welcome to the First Page<Content/>
>> > </Page>
>> >
>> > Thanks in advance
>> >
>>
>

Re: Output to XML

Posted by ALAA MURAD <al...@gmail.com>.
First,  thanks for the quick response
If u could tell me what file that generate  the RSS /Atom feed ? as I need
to modify it

Thanks in advance

On Mon, Oct 19, 2009 at 6:10 PM, Matt Raible <ma...@raibledesigns.com> wrote:

> I would recommend grabbing the Atom or RSS feed for the blog rather
> than the HTML output.
>
> On Mon, Oct 19, 2009 at 9:07 AM, ALAA MURAD <al...@gmail.com> wrote:
> > Hi, I'm trying to create XML output for the blog as I want to create a
> > custom GWT theme. I don't want to use the velocity engine , I want to use
> > direct Java object so I can produce well formated XML.
> >
> > Any idea ?
> >
> > Example
> >
> > Service.jsp?action=page&pageid=1
> >
> > Out:
> >
> > <Page>
> > <Title>Hello World</Title>
> > <Content>Welcome to the First Page<Content/>
> > </Page>
> >
> > Thanks in advance
> >
>

Re: Output to XML

Posted by Matt Raible <ma...@raibledesigns.com>.
I would recommend grabbing the Atom or RSS feed for the blog rather
than the HTML output.

On Mon, Oct 19, 2009 at 9:07 AM, ALAA MURAD <al...@gmail.com> wrote:
> Hi, I'm trying to create XML output for the blog as I want to create a
> custom GWT theme. I don't want to use the velocity engine , I want to use
> direct Java object so I can produce well formated XML.
>
> Any idea ?
>
> Example
>
> Service.jsp?action=page&pageid=1
>
> Out:
>
> <Page>
> <Title>Hello World</Title>
> <Content>Welcome to the First Page<Content/>
> </Page>
>
> Thanks in advance
>

Re: Output to XML

Posted by Dave <sn...@gmail.com>.
On Mon, Oct 19, 2009 at 11:07 AM, ALAA MURAD <al...@gmail.com> wrote:
> Hi, I'm trying to create XML output for the blog as I want to create a
> custom GWT theme. I don't want to use the velocity engine , I want to use
> direct Java object so I can produce well formated XML.

The Velocity engine can be used to produce well-formed validating XML,
in fact, that's what we use to create the RSS and Atom feeds. See
WEB-INF/velocity/feeds.vm and WEB-INF/velocity/templates/feeds.

- Dave