You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brian Delahunty <bd...@tssg.org> on 2003/06/17 11:17:41 UTC
Custom Generators - SAX 2
Hi (again),
I asked a question yesterday about custom generators ad I'd like to ask a similar question today.
If I have a URL to an XML page and I need to "pass it back" from the generator.
I'm using this code:
public class RSSGenerator extends AbstractGenerator {
public void generate() throws SAXException {
try {
XMLReader xmlr = XMLReaderFactory.createXMLReader();
xmlr.setContentHandler(this.contentHandler);
xmlr.parse(http://www.website.com/xmlpage.aspx);
}
.
.
.
I basically need a RSSGenerator... It will get an RSS feed address from a database and then send back the xml to cocoon.
Any ideas?
Brian
Re: Custom Generators - SAX 2
Posted by Brian Delahunty <bd...@tssg.org>.
I was using that but I was then "informed" [read: told] that I was to use a
custom generator.
It's ok though. I've fixed it. :-D
Thanks anyway
Brian
----- Original Message -----
From: "Reinhard Pötz" <re...@gmx.net>
To: <co...@xml.apache.org>
Sent: Tuesday, June 17, 2003 10:25 AM
Subject: RE: Custom Generators - SAX 2
> >
> > From: Brian Delahunty [mailto:bdelahunty@tssg.org]
> >
> > Hi (again),
> >
> > I asked a question yesterday about custom generators ad I'd like to
> ask a similar question today.
> >
> > If I have a URL to an XML page and I need to "pass it back" from the
> generator.
> >
> >
> > I'm using this code:
> >
> > public class RSSGenerator extends AbstractGenerator {
> > public void generate() throws SAXException {
> > try {
> > XMLReader xmlr = XMLReaderFactory.createXMLReader();
> > xmlr.setContentHandler(this.contentHandler);
> > xmlr.parse(http://www.website.com/xmlpage.aspx);
> > }
> > .
> > .
> > .
> > I basically need a RSSGenerator... It will get an RSS feed address
> from a database and then send back the xml to cocoon.
> > Any ideas?
> >
> >
>
> Why don't you use the file generator?
>
> <map:generate src="http://www.website.com/xmlpage.aspx"/>
>
> Reinhard
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
RE: Custom Generators - SAX 2
Posted by Reinhard Pötz <re...@gmx.net>.
>
> From: Brian Delahunty [mailto:bdelahunty@tssg.org]
>
> Hi (again),
>
> I asked a question yesterday about custom generators ad I'd like to
ask a similar question today.
>
> If I have a URL to an XML page and I need to "pass it back" from the
generator.
>
>
> I'm using this code:
>
> public class RSSGenerator extends AbstractGenerator {
> public void generate() throws SAXException {
> try {
> XMLReader xmlr = XMLReaderFactory.createXMLReader();
> xmlr.setContentHandler(this.contentHandler);
> xmlr.parse(http://www.website.com/xmlpage.aspx);
> }
> .
> .
> .
> I basically need a RSSGenerator... It will get an RSS feed address
from a database and then send back the xml to cocoon.
> Any ideas?
>
>
Why don't you use the file generator?
<map:generate src="http://www.website.com/xmlpage.aspx"/>
Reinhard
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org