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