Marvellous. I hoped it would be that easy! -----Original Message----- From: David Rosenstrauch [mailto:[EMAIL PROTECTED]] Sent: 11 December 2001 02:52 To: [EMAIL PROTECTED] Subject: Re: How best to incorporate xml from a string into XSP
Someone else had this same problem recently. Use <util:include-expr>. It will parse the text that you pass in to it, and generate SAX calls from it (as opposed to writing the text straight to the output - after escaping all the control chars - like it's doing now). 1) Include the namespace xmlns:util="http://apache.org/xsp/util/2.0" in your XSP or the <util:include-expr> won't get called properly. 2) the call you need to make this work: <util:include-expr><util:expr><xsp:expr>myString</xsp:expr></util:expr></uti l:include-expr> <xsp:expr>myString</xsp:expr> takes the value of String myString, which is then passed in to <util:include-expr>. DR At 11:01 PM 12/10/01 +0000, you wrote: >Could someone help > >I have a method on an object that produces XML as a string. >I wish to incorporate it into an XSP page. > ><xsp:expr>myString</xsp:expr> >doesn't work, since it kindly changes < into < etc. > >I have tried various approaches, each with various unwanted side effects. > >Could someone tell me what is the BEST way to achieve this? > >i.e. > >Parse it? >DOM vs SAX? >use this.contentHandler? >use <xsp:expr>myStringAsANode</xsp:expr>? > >some other Cocoon technique/ generator/transformer etc > >Christopher > > > >--------------------------------------------------------------------- >Please check that your question has not already been answered in the >FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>