cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durrant, Peter" <Peter.Durr...@COGNOS.com>
Subject RE: Outputing a JDOM document in an XSP page
Date Tue, 12 Feb 2002 17:39:37 GMT
Hi

I found a solution to my problem using the JDOM XMLOutputter. This will
output an XML document from a JDOM into a tag (<mytag> in the example
below):

<xsp:page>
	..
	org.jdom.input.SAXBuilder builder = new org.jdom.input.SAXBuilder();
	org.jdom.Document doc = builder.build(url);
	org.jdom.output.XMLOutputter fmt = new
org.jdom.output.XMLOutputter();
	<mytag><xsp:expr>fmt.outputString(doc)</xsp:expr></mytag>
	..
</xsp:page>

If anyone has experience of this, is this the most efficient method?

-- Using <xsp:expr>doc.getDocumentElement()</xsp:expr>
-- essentially outputs just the name of the node.

Cheers
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message