You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Durrant, Peter" <Pe...@COGNOS.com> on 2002/02/12 13:25:40 UTC

Outputing a JDOM document in an XSP page

Hi

I have a JDOM document that I want to include in the output of an XSP page.
Is this possible?

The following code is used to create the JDOM document:
	<xsp:logic>
		..
		org.jdom.input.SAXBuilder builder = new
org.jdom.input.SAXBuilder();
		org.jdom.Document doc = builder.build(url);
		..
	</xsp:logic>

I would then like to output the document in my XSP page:
	<xsp:page>
		..
		<myJDOMdoc>
			<!-- output JDOM document here -->
		</myJDOMdoc>
		..
	</xsp:page>

What do I need to do to output the document?

Thanks in advance for any help.
Pete
---
Cognos, London, UK


This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: Outputing a JDOM document in an XSP page

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Durrant, Peter [mailto:Peter.Durrant@COGNOS.com]
> 
> Hi
> 
> I have a JDOM document that I want to include in the output of an XSP
page.
> Is this possible?
> 
> The following code is used to create the JDOM document:
> 	<xsp:logic>
> 		..
> 		org.jdom.input.SAXBuilder builder = new
> org.jdom.input.SAXBuilder();
> 		org.jdom.Document doc = builder.build(url);
> 		..
> 	</xsp:logic>
> 
> I would then like to output the document in my XSP page:
> 	<xsp:page>
> 		..
> 		<myJDOMdoc>
> 			<!-- output JDOM document here -->
> 		</myJDOMdoc>
> 		..
> 	</xsp:page>
> 
> What do I need to do to output the document?

Try <xsp:expr>doc.getDocumentElement()</xsp:expr>.
(getDocumentElement will return Node, right? you need node inside
<xsp:expr/>)


Vadim


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>