> -----Original Message-----
> From: Damian Chojna [mailto:d.chojna@;adv.pl]
> Sent: Thursday, November 14, 2002 6:02 PM
> To: [EMAIL PROTECTED]
> 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?

Yep, you are right. I developed the component long time ago ... Please try
org.apache.avalon.excalibur.xml.JaxpParser.

>
> 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?

Currently there is a problem with the encoding (always UTF-8 encoding is
used) when you use Xalan. As far as I know those problem don't arise if you
use Saxon.

I don't know how you can remove the processing instruction.

Regards,
Reinhard

>
> 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