Hi Damian,

Perhaps it helps : If you are in XSP, the following tags resolve it without
java code :

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp";
xmlns:util="http://apache.org/xsp/util/2.0";>
...
<util:include-expr>
<util:expr><xsp:expr>
yourXMLString
</xsp:expr></util:expr>
</util:include-expr>
...

Regards,

Ludovic

----- Original Message -----
From: "Damian Chojna" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 6:02 PM
Subject: Re: R: Strings to SAX events


> Hi Reinhard,
>
> thanks for the last post. I also need to add a string as XML elements
> into an XSP generator and I used your suggestion (below). It seems
> to work well, but I have two questions:
>
> 1) I've noticed that the API states that the Parser is deprecated. I'm
> currently using 2.0.3, if I choose to use this method will it effect me
> being able to move to a newer version of cocoon at some time in the
future?
>
> 2) When I generate my XML elements it seems that the parser is including
> the <?xml version="1.0" encoding="UTF-8"?> header. Is there a way to get
> the parser not to include it, as it is causing me problems?
>
> Thanks in advance!
> Damian.
>
>
>
>
> [EMAIL PROTECTED] wrote:
>
> > Luca,
> >
> > In a generator I use flowing code within the generate()-Method. Maybe
this
> > helps:
> >
> > parser = (Parser)this.manager.lookup(Parser.ROLE);
> > parser.setConsumer(super.xmlConsumer);
> > parser.parse(new InputSource(new StringReader(sb.toString())));
> >
> > Regards,
> > Reinhard
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to